[Fusionforge-commits] r15540 - in branches/Branch_5_2: . src/db src/debian src/packaging/control src/packaging/install src/utils

Roland Mas lolando at fusionforge.org
Mon May 21 15:18:35 CEST 2012


Author: lolando
Date: 2012-05-21 15:18:34 +0200 (Mon, 21 May 2012)
New Revision: 15540

Added:
   branches/Branch_5_2/src/utils/ffcountries.pl
Modified:
   branches/Branch_5_2/
   branches/Branch_5_2/src/db/200403251.sql
   branches/Branch_5_2/src/debian/changelog
   branches/Branch_5_2/src/debian/control
   branches/Branch_5_2/src/debian/rules
   branches/Branch_5_2/src/packaging/control/000source
   branches/Branch_5_2/src/packaging/install/db-postgresql
Log:
Refresh list of country codes (and refresh it again at each Debian package build)

Modified: branches/Branch_5_2/src/db/200403251.sql
===================================================================
--- branches/Branch_5_2/src/db/200403251.sql	2012-05-21 09:59:30 UTC (rev 15539)
+++ branches/Branch_5_2/src/db/200403251.sql	2012-05-21 13:18:34 UTC (rev 15540)
@@ -6,246 +6,256 @@
 UPDATE USERS SET ccode='US',firstname=realname WHERE firstname is null;
 
 CREATE TABLE country_code (
-country_name varchar(80),
-ccode char(2) primary key
+	country_name varchar(80),
+	ccode char(2) primary key
 );
 
-INSERT INTO country_code VALUES ('AFGHANISTAN','AF');
-INSERT INTO country_code VALUES ('ALBANIA','AL');
-INSERT INTO country_code VALUES ('ALGERIA','DZ');
-INSERT INTO country_code VALUES ('AMERICAN SAMOA','AS');
-INSERT INTO country_code VALUES ('ANDORRA','AD');
-INSERT INTO country_code VALUES ('ANGOLA','AO');
-INSERT INTO country_code VALUES ('ANGUILLA','AI');
-INSERT INTO country_code VALUES ('ANTARCTICA','AQ');
-INSERT INTO country_code VALUES ('ANTIGUA AND BARBUDA','AG');
-INSERT INTO country_code VALUES ('ARGENTINA','AR');
-INSERT INTO country_code VALUES ('ARMENIA','AM');
-INSERT INTO country_code VALUES ('ARUBA','AW');
-INSERT INTO country_code VALUES ('AUSTRALIA','AU');
-INSERT INTO country_code VALUES ('AUSTRIA','AT');
-INSERT INTO country_code VALUES ('AZERBAIJAN','AZ');
-INSERT INTO country_code VALUES ('BAHAMAS','BS');
-INSERT INTO country_code VALUES ('BAHRAIN','BH');
-INSERT INTO country_code VALUES ('BANGLADESH','BD');
-INSERT INTO country_code VALUES ('BARBADOS','BB');
-INSERT INTO country_code VALUES ('BELARUS','BY');
-INSERT INTO country_code VALUES ('BELGIUM','BE');
-INSERT INTO country_code VALUES ('BELIZE','BZ');
-INSERT INTO country_code VALUES ('BENIN','BJ');
-INSERT INTO country_code VALUES ('BERMUDA','BM');
-INSERT INTO country_code VALUES ('BHUTAN','BT');
-INSERT INTO country_code VALUES ('BOLIVIA','BO');
-INSERT INTO country_code VALUES ('BOSNIA AND HERZEGOVINA','BA');
-INSERT INTO country_code VALUES ('BOTSWANA','BW');
-INSERT INTO country_code VALUES ('BOUVET ISLAND','BV');
-INSERT INTO country_code VALUES ('BRAZIL','BR');
-INSERT INTO country_code VALUES ('BRITISH INDIAN OCEAN TERRITORY','IO');
-INSERT INTO country_code VALUES ('BRUNEI DARUSSALAM','BN');
-INSERT INTO country_code VALUES ('BULGARIA','BG');
-INSERT INTO country_code VALUES ('BURKINA FASO','BF');
-INSERT INTO country_code VALUES ('BURUNDI','BI');
-INSERT INTO country_code VALUES ('CAMBODIA','KH');
-INSERT INTO country_code VALUES ('CAMEROON','CM');
-INSERT INTO country_code VALUES ('CANADA','CA');
-INSERT INTO country_code VALUES ('CAPE VERDE','CV');
-INSERT INTO country_code VALUES ('CAYMAN ISLANDS','KY');
-INSERT INTO country_code VALUES ('CENTRAL AFRICAN REPUBLIC','CF');
-INSERT INTO country_code VALUES ('CHAD','TD');
-INSERT INTO country_code VALUES ('CHILE','CL');
-INSERT INTO country_code VALUES ('CHINA','CN');
-INSERT INTO country_code VALUES ('CHRISTMAS ISLAND','CX');
-INSERT INTO country_code VALUES ('COCOS (KEELING) ISLANDS','CC');
-INSERT INTO country_code VALUES ('COLOMBIA','CO');
-INSERT INTO country_code VALUES ('COMOROS','KM');
-INSERT INTO country_code VALUES ('CONGO','CG');
-INSERT INTO country_code VALUES ('CONGO, THE DEMOCRATIC REPUBLIC OF THE','CD');
-INSERT INTO country_code VALUES ('COOK ISLANDS','CK');
-INSERT INTO country_code VALUES ('COSTA RICA','CR');
-INSERT INTO country_code VALUES ('COTE D\'IVOIRE','CI');
-INSERT INTO country_code VALUES ('CROATIA','HR');
-INSERT INTO country_code VALUES ('CUBA','CU');
-INSERT INTO country_code VALUES ('CYPRUS','CY');
-INSERT INTO country_code VALUES ('CZECH REPUBLIC','CZ');
-INSERT INTO country_code VALUES ('DENMARK','DK');
-INSERT INTO country_code VALUES ('DJIBOUTI','DJ');
-INSERT INTO country_code VALUES ('DOMINICA','DM');
-INSERT INTO country_code VALUES ('DOMINICAN REPUBLIC','DO');
-INSERT INTO country_code VALUES ('EAST TIMOR','TP');
-INSERT INTO country_code VALUES ('ECUADOR','EC');
-INSERT INTO country_code VALUES ('EGYPT','EG');
-INSERT INTO country_code VALUES ('EL SALVADOR','SV');
-INSERT INTO country_code VALUES ('EQUATORIAL GUINEA','GQ');
-INSERT INTO country_code VALUES ('ERITREA','ER');
-INSERT INTO country_code VALUES ('ESTONIA','EE');
-INSERT INTO country_code VALUES ('ETHIOPIA','ET');
-INSERT INTO country_code VALUES ('FALKLAND ISLANDS (MALVINAS)','FK');
-INSERT INTO country_code VALUES ('FAROE ISLANDS','FO');
-INSERT INTO country_code VALUES ('FIJI','FJ');
-INSERT INTO country_code VALUES ('FINLAND','FI');
-INSERT INTO country_code VALUES ('FRANCE','FR');
-INSERT INTO country_code VALUES ('FRENCH GUIANA','GF');
-INSERT INTO country_code VALUES ('FRENCH POLYNESIA','PF');
-INSERT INTO country_code VALUES ('FRENCH SOUTHERN TERRITORIES','TF');
-INSERT INTO country_code VALUES ('GABON','GA');
-INSERT INTO country_code VALUES ('GAMBIA','GM');
-INSERT INTO country_code VALUES ('GEORGIA','GE');
-INSERT INTO country_code VALUES ('GERMANY','DE');
-INSERT INTO country_code VALUES ('GHANA','GH');
-INSERT INTO country_code VALUES ('GIBRALTAR','GI');
-INSERT INTO country_code VALUES ('GREECE','GR');
-INSERT INTO country_code VALUES ('GREENLAND','GL');
-INSERT INTO country_code VALUES ('GRENADA','GD');
-INSERT INTO country_code VALUES ('GUADELOUPE','GP');
-INSERT INTO country_code VALUES ('GUAM','GU');
-INSERT INTO country_code VALUES ('GUATEMALA','GT');
-INSERT INTO country_code VALUES ('GUINEA','GN');
-INSERT INTO country_code VALUES ('GUINEA-BISSAU','GW');
-INSERT INTO country_code VALUES ('GUYANA','GY');
-INSERT INTO country_code VALUES ('HAITI','HT');
-INSERT INTO country_code VALUES ('HEARD ISLAND AND MCDONALD ISLANDS','HM');
-INSERT INTO country_code VALUES ('HOLY SEE (VATICAN CITY STATE)','VA');
-INSERT INTO country_code VALUES ('HONDURAS','HN');
-INSERT INTO country_code VALUES ('HONG KONG','HK');
-INSERT INTO country_code VALUES ('HUNGARY','HU');
-INSERT INTO country_code VALUES ('ICELAND','IS');
-INSERT INTO country_code VALUES ('INDIA','IN');
-INSERT INTO country_code VALUES ('INDONESIA','ID');
-INSERT INTO country_code VALUES ('IRAN, ISLAMIC REPUBLIC OF','IR');
-INSERT INTO country_code VALUES ('IRAQ','IQ');
-INSERT INTO country_code VALUES ('IRELAND','IE');
-INSERT INTO country_code VALUES ('ISRAEL','IL');
-INSERT INTO country_code VALUES ('ITALY','IT');
-INSERT INTO country_code VALUES ('JAMAICA','JM');
-INSERT INTO country_code VALUES ('JAPAN','JP');
-INSERT INTO country_code VALUES ('JORDAN','JO');
-INSERT INTO country_code VALUES ('KAZAKSTAN','KZ');
-INSERT INTO country_code VALUES ('KENYA','KE');
-INSERT INTO country_code VALUES ('KIRIBATI','KI');
-INSERT INTO country_code VALUES ('KOREA, DEMOCRATIC PEOPLE\'S REPUBLIC OF','KP');
-INSERT INTO country_code VALUES ('KOREA, REPUBLIC OF','KR');
-INSERT INTO country_code VALUES ('KUWAIT','KW');
-INSERT INTO country_code VALUES ('KYRGYZSTAN','KG');
-INSERT INTO country_code VALUES ('LAO PEOPLE\'S DEMOCRATIC REPUBLIC','LA');
-INSERT INTO country_code VALUES ('LATVIA','LV');
-INSERT INTO country_code VALUES ('LEBANON','LB');
-INSERT INTO country_code VALUES ('LESOTHO','LS');
-INSERT INTO country_code VALUES ('LIBERIA','LR');
-INSERT INTO country_code VALUES ('LIBYAN ARAB JAMAHIRIYA','LY');
-INSERT INTO country_code VALUES ('LIECHTENSTEIN','LI');
-INSERT INTO country_code VALUES ('LITHUANIA','LT');
-INSERT INTO country_code VALUES ('LUXEMBOURG','LU');
-INSERT INTO country_code VALUES ('MACAU','MO');
-INSERT INTO country_code VALUES ('MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF','MK');
-INSERT INTO country_code VALUES ('MADAGASCAR','MG');
-INSERT INTO country_code VALUES ('MALAWI','MW');
-INSERT INTO country_code VALUES ('MALAYSIA','MY');
-INSERT INTO country_code VALUES ('MALDIVES','MV');
-INSERT INTO country_code VALUES ('MALI','ML');
-INSERT INTO country_code VALUES ('MALTA','MT');
-INSERT INTO country_code VALUES ('MARSHALL ISLANDS','MH');
-INSERT INTO country_code VALUES ('MARTINIQUE','MQ');
-INSERT INTO country_code VALUES ('MAURITANIA','MR');
-INSERT INTO country_code VALUES ('MAURITIUS','MU');
-INSERT INTO country_code VALUES ('MAYOTTE','YT');
-INSERT INTO country_code VALUES ('MEXICO','MX');
-INSERT INTO country_code VALUES ('MICRONESIA, FEDERATED STATES OF','FM');
-INSERT INTO country_code VALUES ('MOLDOVA, REPUBLIC OF','MD');
-INSERT INTO country_code VALUES ('MONACO','MC');
-INSERT INTO country_code VALUES ('MONGOLIA','MN');
-INSERT INTO country_code VALUES ('MONTSERRAT','MS');
-INSERT INTO country_code VALUES ('MOROCCO','MA');
-INSERT INTO country_code VALUES ('MOZAMBIQUE','MZ');
-INSERT INTO country_code VALUES ('MYANMAR','MM');
-INSERT INTO country_code VALUES ('NAMIBIA','NA');
-INSERT INTO country_code VALUES ('NAURU','NR');
-INSERT INTO country_code VALUES ('NEPAL','NP');
-INSERT INTO country_code VALUES ('NETHERLANDS','NL');
-INSERT INTO country_code VALUES ('NETHERLANDS ANTILLES','AN');
-INSERT INTO country_code VALUES ('NEW CALEDONIA','NC');
-INSERT INTO country_code VALUES ('NEW ZEALAND','NZ');
-INSERT INTO country_code VALUES ('NICARAGUA','NI');
-INSERT INTO country_code VALUES ('NIGER','NE');
-INSERT INTO country_code VALUES ('NIGERIA','NG');
-INSERT INTO country_code VALUES ('NIUE','NU');
-INSERT INTO country_code VALUES ('NORFOLK ISLAND','NF');
-INSERT INTO country_code VALUES ('NORTHERN MARIANA ISLANDS','MP');
-INSERT INTO country_code VALUES ('NORWAY','NO');
-INSERT INTO country_code VALUES ('OMAN','OM');
-INSERT INTO country_code VALUES ('PAKISTAN','PK');
-INSERT INTO country_code VALUES ('PALAU','PW');
-INSERT INTO country_code VALUES ('PALESTINIAN TERRITORY, OCCUPIED','PS');
-INSERT INTO country_code VALUES ('PANAMA','PA');
-INSERT INTO country_code VALUES ('PAPUA NEW GUINEA','PG');
-INSERT INTO country_code VALUES ('PARAGUAY','PY');
-INSERT INTO country_code VALUES ('PERU','PE');
-INSERT INTO country_code VALUES ('PHILIPPINES','PH');
-INSERT INTO country_code VALUES ('PITCAIRN','PN');
-INSERT INTO country_code VALUES ('POLAND','PL');
-INSERT INTO country_code VALUES ('PORTUGAL','PT');
-INSERT INTO country_code VALUES ('PUERTO RICO','PR');
-INSERT INTO country_code VALUES ('QATAR','QA');
-INSERT INTO country_code VALUES ('REUNION','RE');
-INSERT INTO country_code VALUES ('ROMANIA','RO');
-INSERT INTO country_code VALUES ('RUSSIAN FEDERATION','RU');
-INSERT INTO country_code VALUES ('RWANDA','RW');
-INSERT INTO country_code VALUES ('SAINT HELENA','SH');
-INSERT INTO country_code VALUES ('SAINT KITTS AND NEVIS','KN');
-INSERT INTO country_code VALUES ('SAINT LUCIA','LC');
-INSERT INTO country_code VALUES ('SAINT PIERRE AND MIQUELON','PM');
-INSERT INTO country_code VALUES ('SAINT VINCENT AND THE GRENADINES','VC');
-INSERT INTO country_code VALUES ('SAMOA','WS');
-INSERT INTO country_code VALUES ('SAN MARINO','SM');
-INSERT INTO country_code VALUES ('SAO TOME AND PRINCIPE','ST');
-INSERT INTO country_code VALUES ('SAUDI ARABIA','SA');
-INSERT INTO country_code VALUES ('SENEGAL','SN');
-INSERT INTO country_code VALUES ('SEYCHELLES','SC');
-INSERT INTO country_code VALUES ('SIERRA LEONE','SL');
-INSERT INTO country_code VALUES ('SINGAPORE','SG');
-INSERT INTO country_code VALUES ('SLOVAKIA','SK');
-INSERT INTO country_code VALUES ('SLOVENIA','SI');
-INSERT INTO country_code VALUES ('SOLOMON ISLANDS','SB');
-INSERT INTO country_code VALUES ('SOMALIA','SO');
-INSERT INTO country_code VALUES ('SOUTH AFRICA','ZA');
-INSERT INTO country_code VALUES ('SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS','GS');
-INSERT INTO country_code VALUES ('SPAIN','ES');
-INSERT INTO country_code VALUES ('SRI LANKA','LK');
-INSERT INTO country_code VALUES ('SUDAN','SD');
-INSERT INTO country_code VALUES ('SURINAME','SR');
-INSERT INTO country_code VALUES ('SVALBARD AND JAN MAYEN','SJ');
-INSERT INTO country_code VALUES ('SWAZILAND','SZ');
-INSERT INTO country_code VALUES ('SWEDEN','SE');
-INSERT INTO country_code VALUES ('SWITZERLAND','CH');
-INSERT INTO country_code VALUES ('SYRIAN ARAB REPUBLIC','SY');
-INSERT INTO country_code VALUES ('TAIWAN, PROVINCE OF CHINA','TW');
-INSERT INTO country_code VALUES ('TAJIKISTAN','TJ');
-INSERT INTO country_code VALUES ('TANZANIA, UNITED REPUBLIC OF','TZ');
-INSERT INTO country_code VALUES ('THAILAND','TH');
-INSERT INTO country_code VALUES ('TOGO','TG');
-INSERT INTO country_code VALUES ('TOKELAU','TK');
-INSERT INTO country_code VALUES ('TONGA','TO');
-INSERT INTO country_code VALUES ('TRINIDAD AND TOBAGO','TT');
-INSERT INTO country_code VALUES ('TUNISIA','TN');
-INSERT INTO country_code VALUES ('TURKEY','TR');
-INSERT INTO country_code VALUES ('TURKMENISTAN','TM');
-INSERT INTO country_code VALUES ('TURKS AND CAICOS ISLANDS','TC');
-INSERT INTO country_code VALUES ('TUVALU','TV');
-INSERT INTO country_code VALUES ('UGANDA','UG');
-INSERT INTO country_code VALUES ('UKRAINE','UA');
-INSERT INTO country_code VALUES ('UNITED ARAB EMIRATES','AE');
-INSERT INTO country_code VALUES ('UNITED STATES','US');
-INSERT INTO country_code VALUES ('UNITED STATES MINOR OUTLYING ISLANDS','UM');
-INSERT INTO country_code VALUES ('URUGUAY','UY');
-INSERT INTO country_code VALUES ('UZBEKISTAN','UZ');
-INSERT INTO country_code VALUES ('VANUATU','VU');
-INSERT INTO country_code VALUES ('VENEZUELA','VE');
-INSERT INTO country_code VALUES ('VIET NAM','VN');
-INSERT INTO country_code VALUES ('VIRGIN ISLANDS, BRITISH','VG');
-INSERT INTO country_code VALUES ('VIRGIN ISLANDS, U.S.','VI');
-INSERT INTO country_code VALUES ('WALLIS AND FUTUNA','WF');
-INSERT INTO country_code VALUES ('WESTERN SAHARA','EH');
-INSERT INTO country_code VALUES ('YEMEN','YE');
-INSERT INTO country_code VALUES ('YUGOSLAVIA','YU');
-INSERT INTO country_code VALUES ('ZAMBIA','ZM');
-INSERT INTO country_code VALUES ('ZIMBABWE','ZW');
-INSERT INTO country_code VALUES ('UNITED KINGDOM','UK');
+INSERT INTO country_code VALUES ("Afghanistan",'AF');
+INSERT INTO country_code VALUES ("Åland Islands",'AX');
+INSERT INTO country_code VALUES ("Albania",'AL');
+INSERT INTO country_code VALUES ("Algeria",'DZ');
+INSERT INTO country_code VALUES ("American Samoa",'AS');
+INSERT INTO country_code VALUES ("Andorra",'AD');
+INSERT INTO country_code VALUES ("Angola",'AO');
+INSERT INTO country_code VALUES ("Anguilla",'AI');
+INSERT INTO country_code VALUES ("Antarctica",'AQ');
+INSERT INTO country_code VALUES ("Antigua and Barbuda",'AG');
+INSERT INTO country_code VALUES ("Argentina",'AR');
+INSERT INTO country_code VALUES ("Armenia",'AM');
+INSERT INTO country_code VALUES ("Aruba",'AW');
+INSERT INTO country_code VALUES ("Australia",'AU');
+INSERT INTO country_code VALUES ("Austria",'AT');
+INSERT INTO country_code VALUES ("Azerbaijan",'AZ');
+INSERT INTO country_code VALUES ("Bahamas",'BS');
+INSERT INTO country_code VALUES ("Bahrain",'BH');
+INSERT INTO country_code VALUES ("Bangladesh",'BD');
+INSERT INTO country_code VALUES ("Barbados",'BB');
+INSERT INTO country_code VALUES ("Belarus",'BY');
+INSERT INTO country_code VALUES ("Belgium",'BE');
+INSERT INTO country_code VALUES ("Belize",'BZ');
+INSERT INTO country_code VALUES ("Benin",'BJ');
+INSERT INTO country_code VALUES ("Bermuda",'BM');
+INSERT INTO country_code VALUES ("Bhutan",'BT');
+INSERT INTO country_code VALUES ("Bolivia",'BO');
+INSERT INTO country_code VALUES ("Bonaire, Sint Eustatius and Saba",'BQ');
+INSERT INTO country_code VALUES ("Bosnia and Herzegovina",'BA');
+INSERT INTO country_code VALUES ("Botswana",'BW');
+INSERT INTO country_code VALUES ("Bouvet Island",'BV');
+INSERT INTO country_code VALUES ("Brazil",'BR');
+INSERT INTO country_code VALUES ("British Indian Ocean Territory",'IO');
+INSERT INTO country_code VALUES ("Brunei Darussalam",'BN');
+INSERT INTO country_code VALUES ("Bulgaria",'BG');
+INSERT INTO country_code VALUES ("Burkina Faso",'BF');
+INSERT INTO country_code VALUES ("Burundi",'BI');
+INSERT INTO country_code VALUES ("Cambodia",'KH');
+INSERT INTO country_code VALUES ("Cameroon",'CM');
+INSERT INTO country_code VALUES ("Canada",'CA');
+INSERT INTO country_code VALUES ("Cape Verde",'CV');
+INSERT INTO country_code VALUES ("Cayman Islands",'KY');
+INSERT INTO country_code VALUES ("Central African Republic",'CF');
+INSERT INTO country_code VALUES ("Chad",'TD');
+INSERT INTO country_code VALUES ("Chile",'CL');
+INSERT INTO country_code VALUES ("China",'CN');
+INSERT INTO country_code VALUES ("Christmas Island",'CX');
+INSERT INTO country_code VALUES ("Cocos (Keeling) Islands",'CC');
+INSERT INTO country_code VALUES ("Colombia",'CO');
+INSERT INTO country_code VALUES ("Comoros",'KM');
+INSERT INTO country_code VALUES ("Congo",'CG');
+INSERT INTO country_code VALUES ("Congo, The Democratic Republic of the",'CD');
+INSERT INTO country_code VALUES ("Cook Islands",'CK');
+INSERT INTO country_code VALUES ("Costa Rica",'CR');
+INSERT INTO country_code VALUES ("Côte d'Ivoire",'CI');
+INSERT INTO country_code VALUES ("Croatia",'HR');
+INSERT INTO country_code VALUES ("Cuba",'CU');
+INSERT INTO country_code VALUES ("Curaçao",'CW');
+INSERT INTO country_code VALUES ("Cyprus",'CY');
+INSERT INTO country_code VALUES ("Czech Republic",'CZ');
+INSERT INTO country_code VALUES ("Denmark",'DK');
+INSERT INTO country_code VALUES ("Djibouti",'DJ');
+INSERT INTO country_code VALUES ("Dominica",'DM');
+INSERT INTO country_code VALUES ("Dominican Republic",'DO');
+INSERT INTO country_code VALUES ("Ecuador",'EC');
+INSERT INTO country_code VALUES ("Egypt",'EG');
+INSERT INTO country_code VALUES ("El Salvador",'SV');
+INSERT INTO country_code VALUES ("Equatorial Guinea",'GQ');
+INSERT INTO country_code VALUES ("Eritrea",'ER');
+INSERT INTO country_code VALUES ("Estonia",'EE');
+INSERT INTO country_code VALUES ("Ethiopia",'ET');
+INSERT INTO country_code VALUES ("Falkland Islands (Malvinas)",'FK');
+INSERT INTO country_code VALUES ("Faroe Islands",'FO');
+INSERT INTO country_code VALUES ("Fiji",'FJ');
+INSERT INTO country_code VALUES ("Finland",'FI');
+INSERT INTO country_code VALUES ("France",'FR');
+INSERT INTO country_code VALUES ("French Guiana",'GF');
+INSERT INTO country_code VALUES ("French Polynesia",'PF');
+INSERT INTO country_code VALUES ("French Southern Territories",'TF');
+INSERT INTO country_code VALUES ("Gabon",'GA');
+INSERT INTO country_code VALUES ("Gambia",'GM');
+INSERT INTO country_code VALUES ("Georgia",'GE');
+INSERT INTO country_code VALUES ("Germany",'DE');
+INSERT INTO country_code VALUES ("Ghana",'GH');
+INSERT INTO country_code VALUES ("Gibraltar",'GI');
+INSERT INTO country_code VALUES ("Greece",'GR');
+INSERT INTO country_code VALUES ("Greenland",'GL');
+INSERT INTO country_code VALUES ("Grenada",'GD');
+INSERT INTO country_code VALUES ("Guadeloupe",'GP');
+INSERT INTO country_code VALUES ("Guam",'GU');
+INSERT INTO country_code VALUES ("Guatemala",'GT');
+INSERT INTO country_code VALUES ("Guernsey",'GG');
+INSERT INTO country_code VALUES ("Guinea",'GN');
+INSERT INTO country_code VALUES ("Guinea-Bissau",'GW');
+INSERT INTO country_code VALUES ("Guyana",'GY');
+INSERT INTO country_code VALUES ("Haiti",'HT');
+INSERT INTO country_code VALUES ("Heard Island and McDonald Islands",'HM');
+INSERT INTO country_code VALUES ("Holy See (Vatican City State)",'VA');
+INSERT INTO country_code VALUES ("Honduras",'HN');
+INSERT INTO country_code VALUES ("Hong Kong",'HK');
+INSERT INTO country_code VALUES ("Hungary",'HU');
+INSERT INTO country_code VALUES ("Iceland",'IS');
+INSERT INTO country_code VALUES ("India",'IN');
+INSERT INTO country_code VALUES ("Indonesia",'ID');
+INSERT INTO country_code VALUES ("Iran, Islamic Republic of",'IR');
+INSERT INTO country_code VALUES ("Iraq",'IQ');
+INSERT INTO country_code VALUES ("Ireland",'IE');
+INSERT INTO country_code VALUES ("Isle of Man",'IM');
+INSERT INTO country_code VALUES ("Israel",'IL');
+INSERT INTO country_code VALUES ("Italy",'IT');
+INSERT INTO country_code VALUES ("Jamaica",'JM');
+INSERT INTO country_code VALUES ("Japan",'JP');
+INSERT INTO country_code VALUES ("Jersey",'JE');
+INSERT INTO country_code VALUES ("Jordan",'JO');
+INSERT INTO country_code VALUES ("Kazakhstan",'KZ');
+INSERT INTO country_code VALUES ("Kenya",'KE');
+INSERT INTO country_code VALUES ("Kiribati",'KI');
+INSERT INTO country_code VALUES ("Korea, Democratic People's Republic of",'KP');
+INSERT INTO country_code VALUES ("Korea, Republic of",'KR');
+INSERT INTO country_code VALUES ("Kuwait",'KW');
+INSERT INTO country_code VALUES ("Kyrgyzstan",'KG');
+INSERT INTO country_code VALUES ("Lao People's Democratic Republic",'LA');
+INSERT INTO country_code VALUES ("Latvia",'LV');
+INSERT INTO country_code VALUES ("Lebanon",'LB');
+INSERT INTO country_code VALUES ("Lesotho",'LS');
+INSERT INTO country_code VALUES ("Liberia",'LR');
+INSERT INTO country_code VALUES ("Libya",'LY');
+INSERT INTO country_code VALUES ("Liechtenstein",'LI');
+INSERT INTO country_code VALUES ("Lithuania",'LT');
+INSERT INTO country_code VALUES ("Luxembourg",'LU');
+INSERT INTO country_code VALUES ("Macao",'MO');
+INSERT INTO country_code VALUES ("Macedonia, Republic of",'MK');
+INSERT INTO country_code VALUES ("Madagascar",'MG');
+INSERT INTO country_code VALUES ("Malawi",'MW');
+INSERT INTO country_code VALUES ("Malaysia",'MY');
+INSERT INTO country_code VALUES ("Maldives",'MV');
+INSERT INTO country_code VALUES ("Mali",'ML');
+INSERT INTO country_code VALUES ("Malta",'MT');
+INSERT INTO country_code VALUES ("Marshall Islands",'MH');
+INSERT INTO country_code VALUES ("Martinique",'MQ');
+INSERT INTO country_code VALUES ("Mauritania",'MR');
+INSERT INTO country_code VALUES ("Mauritius",'MU');
+INSERT INTO country_code VALUES ("Mayotte",'YT');
+INSERT INTO country_code VALUES ("Mexico",'MX');
+INSERT INTO country_code VALUES ("Micronesia, Federated States of",'FM');
+INSERT INTO country_code VALUES ("Moldova",'MD');
+INSERT INTO country_code VALUES ("Monaco",'MC');
+INSERT INTO country_code VALUES ("Mongolia",'MN');
+INSERT INTO country_code VALUES ("Montenegro",'ME');
+INSERT INTO country_code VALUES ("Montserrat",'MS');
+INSERT INTO country_code VALUES ("Morocco",'MA');
+INSERT INTO country_code VALUES ("Mozambique",'MZ');
+INSERT INTO country_code VALUES ("Myanmar",'MM');
+INSERT INTO country_code VALUES ("Namibia",'NA');
+INSERT INTO country_code VALUES ("Nauru",'NR');
+INSERT INTO country_code VALUES ("Nepal",'NP');
+INSERT INTO country_code VALUES ("Netherlands",'NL');
+INSERT INTO country_code VALUES ("New Caledonia",'NC');
+INSERT INTO country_code VALUES ("New Zealand",'NZ');
+INSERT INTO country_code VALUES ("Nicaragua",'NI');
+INSERT INTO country_code VALUES ("Niger",'NE');
+INSERT INTO country_code VALUES ("Nigeria",'NG');
+INSERT INTO country_code VALUES ("Niue",'NU');
+INSERT INTO country_code VALUES ("Norfolk Island",'NF');
+INSERT INTO country_code VALUES ("Northern Mariana Islands",'MP');
+INSERT INTO country_code VALUES ("Norway",'NO');
+INSERT INTO country_code VALUES ("Oman",'OM');
+INSERT INTO country_code VALUES ("Pakistan",'PK');
+INSERT INTO country_code VALUES ("Palau",'PW');
+INSERT INTO country_code VALUES ("Palestinian Territory, Occupied",'PS');
+INSERT INTO country_code VALUES ("Panama",'PA');
+INSERT INTO country_code VALUES ("Papua New Guinea",'PG');
+INSERT INTO country_code VALUES ("Paraguay",'PY');
+INSERT INTO country_code VALUES ("Peru",'PE');
+INSERT INTO country_code VALUES ("Philippines",'PH');
+INSERT INTO country_code VALUES ("Pitcairn",'PN');
+INSERT INTO country_code VALUES ("Poland",'PL');
+INSERT INTO country_code VALUES ("Portugal",'PT');
+INSERT INTO country_code VALUES ("Puerto Rico",'PR');
+INSERT INTO country_code VALUES ("Qatar",'QA');
+INSERT INTO country_code VALUES ("Reunion",'RE');
+INSERT INTO country_code VALUES ("Romania",'RO');
+INSERT INTO country_code VALUES ("Russian Federation",'RU');
+INSERT INTO country_code VALUES ("Rwanda",'RW');
+INSERT INTO country_code VALUES ("Saint Barthélemy",'BL');
+INSERT INTO country_code VALUES ("Saint Helena, Ascension and Tristan da Cunha",'SH');
+INSERT INTO country_code VALUES ("Saint Kitts and Nevis",'KN');
+INSERT INTO country_code VALUES ("Saint Lucia",'LC');
+INSERT INTO country_code VALUES ("Saint Martin (French part)",'MF');
+INSERT INTO country_code VALUES ("Saint Pierre and Miquelon",'PM');
+INSERT INTO country_code VALUES ("Saint Vincent and the Grenadines",'VC');
+INSERT INTO country_code VALUES ("Samoa",'WS');
+INSERT INTO country_code VALUES ("San Marino",'SM');
+INSERT INTO country_code VALUES ("Sao Tome and Principe",'ST');
+INSERT INTO country_code VALUES ("Saudi Arabia",'SA');
+INSERT INTO country_code VALUES ("Senegal",'SN');
+INSERT INTO country_code VALUES ("Serbia",'RS');
+INSERT INTO country_code VALUES ("Seychelles",'SC');
+INSERT INTO country_code VALUES ("Sierra Leone",'SL');
+INSERT INTO country_code VALUES ("Singapore",'SG');
+INSERT INTO country_code VALUES ("Sint Maarten (Dutch part)",'SX');
+INSERT INTO country_code VALUES ("Slovakia",'SK');
+INSERT INTO country_code VALUES ("Slovenia",'SI');
+INSERT INTO country_code VALUES ("Solomon Islands",'SB');
+INSERT INTO country_code VALUES ("Somalia",'SO');
+INSERT INTO country_code VALUES ("South Africa",'ZA');
+INSERT INTO country_code VALUES ("South Georgia and the South Sandwich Islands",'GS');
+INSERT INTO country_code VALUES ("Spain",'ES');
+INSERT INTO country_code VALUES ("Sri Lanka",'LK');
+INSERT INTO country_code VALUES ("Sudan",'SD');
+INSERT INTO country_code VALUES ("Suriname",'SR');
+INSERT INTO country_code VALUES ("South Sudan",'SS');
+INSERT INTO country_code VALUES ("Svalbard and Jan Mayen",'SJ');
+INSERT INTO country_code VALUES ("Swaziland",'SZ');
+INSERT INTO country_code VALUES ("Sweden",'SE');
+INSERT INTO country_code VALUES ("Switzerland",'CH');
+INSERT INTO country_code VALUES ("Syrian Arab Republic",'SY');
+INSERT INTO country_code VALUES ("Taiwan",'TW');
+INSERT INTO country_code VALUES ("Tajikistan",'TJ');
+INSERT INTO country_code VALUES ("Tanzania, United Republic of",'TZ');
+INSERT INTO country_code VALUES ("Thailand",'TH');
+INSERT INTO country_code VALUES ("Timor-Leste",'TL');
+INSERT INTO country_code VALUES ("Togo",'TG');
+INSERT INTO country_code VALUES ("Tokelau",'TK');
+INSERT INTO country_code VALUES ("Tonga",'TO');
+INSERT INTO country_code VALUES ("Trinidad and Tobago",'TT');
+INSERT INTO country_code VALUES ("Tunisia",'TN');
+INSERT INTO country_code VALUES ("Turkey",'TR');
+INSERT INTO country_code VALUES ("Turkmenistan",'TM');
+INSERT INTO country_code VALUES ("Turks and Caicos Islands",'TC');
+INSERT INTO country_code VALUES ("Tuvalu",'TV');
+INSERT INTO country_code VALUES ("Uganda",'UG');
+INSERT INTO country_code VALUES ("Ukraine",'UA');
+INSERT INTO country_code VALUES ("United Arab Emirates",'AE');
+INSERT INTO country_code VALUES ("United Kingdom",'GB');
+INSERT INTO country_code VALUES ("United States",'US');
+INSERT INTO country_code VALUES ("United States Minor Outlying Islands",'UM');
+INSERT INTO country_code VALUES ("Uruguay",'UY');
+INSERT INTO country_code VALUES ("Uzbekistan",'UZ');
+INSERT INTO country_code VALUES ("Vanuatu",'VU');
+INSERT INTO country_code VALUES ("Venezuela",'VE');
+INSERT INTO country_code VALUES ("Viet Nam",'VN');
+INSERT INTO country_code VALUES ("Virgin Islands, British",'VG');
+INSERT INTO country_code VALUES ("Virgin Islands, U.S.",'VI');
+INSERT INTO country_code VALUES ("Wallis and Futuna",'WF');
+INSERT INTO country_code VALUES ("Western Sahara",'EH');
+INSERT INTO country_code VALUES ("Yemen",'YE');
+INSERT INTO country_code VALUES ("Zambia",'ZM');
+INSERT INTO country_code VALUES ("Zimbabwe",'ZW');

Modified: branches/Branch_5_2/src/debian/changelog
===================================================================
--- branches/Branch_5_2/src/debian/changelog	2012-05-21 09:59:30 UTC (rev 15539)
+++ branches/Branch_5_2/src/debian/changelog	2012-05-21 13:18:34 UTC (rev 15540)
@@ -1,8 +1,10 @@
 fusionforge (5.1.50+svn15410-2) UNRELEASED; urgency=low
 
-  * 
+  * Generate initial list of countries and codes from the current known
+    data (from isoquery) at build time (closes: #565240).  Thanks to David
+    Prévot <david at tilapin.org> for the bulk of the patch.
 
- -- Roland Mas <lolando at debian.org>  Fri, 27 Apr 2012 16:15:09 +0200
+ -- Roland Mas <lolando at debian.org>  Mon, 21 May 2012 15:13:05 +0200
 
 fusionforge (5.1.50+svn15410-1) experimental; urgency=low
 

Modified: branches/Branch_5_2/src/debian/control
===================================================================
--- branches/Branch_5_2/src/debian/control	2012-05-21 09:59:30 UTC (rev 15539)
+++ branches/Branch_5_2/src/debian/control	2012-05-21 13:18:34 UTC (rev 15540)
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Roland Mas <lolando at debian.org>
 Uploaders: Christian Bayle <bayle at debian.org>, Olivier Berger <obergix at debian.org>
-Build-Depends-Indep: sharutils, docbook-to-man, devscripts, gettext
+Build-Depends-Indep: sharutils, docbook-to-man, devscripts, gettext, isoquery, iso-codes
 Build-Depends: debhelper (>= 7), quilt (>= 0.40), perl, confget
 Standards-Version: 3.9.2
 Homepage: http://fusionforge.org/

Modified: branches/Branch_5_2/src/debian/rules
===================================================================
--- branches/Branch_5_2/src/debian/rules	2012-05-21 09:59:30 UTC (rev 15539)
+++ branches/Branch_5_2/src/debian/rules	2012-05-21 13:18:34 UTC (rev 15540)
@@ -193,6 +193,9 @@
 #       Build FHS-compatible Apache config files (generates contents of etc/httpd.conf.d-fhs/ etc.)
 	utils/manage-apache-config.sh build
 
+#	Update SQL for list of country codes
+	utils/ffcountries.pl > 200403251.sql
+
 # 	Preprocess files with DSF-Helper
 	perl $(CURDIR)/deb-specific/dsf-helper.pl
 
@@ -208,7 +211,7 @@
 	rm -f $(CURDIR)/debian/*.README.Debian
 	rm -f $(CURDIR)/debian/$(PACKAGE)-config.sgml
 	rm -f $(CURDIR)/debian/$(OLDPACKAGE)-common.manpages
-	rm -f cvssh.1 $(PACKAGE)-config.1
+	rm -f cvssh.1 $(PACKAGE)-config.1 200403251.sql
 	rm -f $(CURDIR)/debian/README.Debian
 	rm -rf locales
 

Modified: branches/Branch_5_2/src/packaging/control/000source
===================================================================
--- branches/Branch_5_2/src/packaging/control/000source	2012-05-21 09:59:30 UTC (rev 15539)
+++ branches/Branch_5_2/src/packaging/control/000source	2012-05-21 13:18:34 UTC (rev 15540)
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Roland Mas <lolando at debian.org>
 Uploaders: Christian Bayle <bayle at debian.org>, Olivier Berger <obergix at debian.org>
-Build-Depends-Indep: sharutils, docbook-to-man, devscripts, gettext
+Build-Depends-Indep: sharutils, docbook-to-man, devscripts, gettext, isoquery, iso-codes
 Build-Depends: debhelper (>= 7), quilt (>= 0.40), perl, confget
 Standards-Version: 3.9.2
 Homepage: http://fusionforge.org/

Modified: branches/Branch_5_2/src/packaging/install/db-postgresql
===================================================================
--- branches/Branch_5_2/src/packaging/install/db-postgresql	2012-05-21 09:59:30 UTC (rev 15539)
+++ branches/Branch_5_2/src/packaging/install/db-postgresql	2012-05-21 13:18:34 UTC (rev 15540)
@@ -45,6 +45,7 @@
 db/2003*.sql                            usr/share/@OLDPACKAGE@/db/
 db/2004*php                             usr/share/@OLDPACKAGE@/db/
 db/2004*.sql                            usr/share/@OLDPACKAGE@/db/
+200403251.sql				usr/share/@OLDPACKAGE@/db/
 db/2005*php                             usr/share/@OLDPACKAGE@/db/
 db/2005*.sql                            usr/share/@OLDPACKAGE@/db/
 db/2006*.sql                            usr/share/@OLDPACKAGE@/db/

Added: branches/Branch_5_2/src/utils/ffcountries.pl
===================================================================
--- branches/Branch_5_2/src/utils/ffcountries.pl	                        (rev 0)
+++ branches/Branch_5_2/src/utils/ffcountries.pl	2012-05-21 13:18:34 UTC (rev 15540)
@@ -0,0 +1,25 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+print "ALTER TABLE users ADD COLUMN firstname varchar(60);
+ALTER TABLE users ADD COLUMN lastname varchar(60);
+ALTER TABLE users ADD COLUMN address2 text;
+ALTER TABLE users ADD COLUMN ccode char(2);
+ALTER TABLE users ALTER COLUMN ccode SET DEFAULT 'US';
+UPDATE USERS SET ccode='US',firstname=realname WHERE firstname is null;
+
+CREATE TABLE country_code (
+	country_name varchar(80),
+	ccode char(2) primary key
+);
+
+";
+
+foreach (`isoquery -c`) {
+	chomp ;
+	my $cc = substr($_,0,2);
+	$_ =~ s/.*\t//;
+	print "INSERT INTO country_code VALUES (\"$_\",'$cc');\n";
+}


Property changes on: branches/Branch_5_2/src/utils/ffcountries.pl
___________________________________________________________________
Added: svn:executable
   + *




More information about the Fusionforge-commits mailing list