An army marches on its stomach but what do different countries feed their troops? Who gets smoked sprats or tinned cheddar – and who wants 'three-year pizza'?

The Taliban might be just a few hundred metres away, but in the mess halls of the US bases in southern Afghanistan, there are more pressing dangers lurking: undercooked eggs. Signs placed above the breakfast fry-up station warn against asking for an egg sunny side up: it's available over-easy only. The reason, as explained by patient cooks to bemused visitors, is that diseases might lurk in a runny yolk. Feeding soldiers in a warzone is one of the biggest challenges for any army. Generals want to keep their soldiers healthy, and food done well, both in the "d-facs" (dining faciliites) and MREs ("meals ready to eat", in US army speak – or "ration packs") can be a morale booster, a reminder of home in a hostile, alien place.

So for soldiers on the ground, one of the most important recent breakthroughs in military technology may be the "three-year pizza", described by its scientist creators as the "holy grail" of ration-pack food.

Pizza is the most asked-for dish when troops are quizzed on what they would like to see in their supplies, but it has taken years of research to come up with a slice that tastes like the real thing, yet can sit on the shelf without the tomato sauce turning the crust soggy or mould growing on the cheese.

The US and other militaries have poured billions into these technologically impressive ration packs. Few commanding officers forget Napoleon Bonaparte's apocryphal remark "an army marches on its stomach", so ration packs have already come a long way from the cans of corned beef that one officer confided were so hated by British soldiers, that on training exercises, they threw them over a cliff, preferring hunger. Scientists and chefs have worked for years to produce tasty food that lasts for months in a sealed pouch or tin.

We decided to test how palatable the newer ration packs are, and begged a meal from the many countries with soldiers in Kabul for a charity dinner in aid of schools in Afghanistan. The meals were rated by a collection of diplomats, officials, aid workers and security contractors from around the world, each paying for the privilege.

The Estonian ambassador returned to Kabul with an overweight suitcase full of smoked sprats, stuffed peppers and halva. Only the Americans declined to contribute. They were legally forbidden from giving away their ration packs, embassy and military officials said apologetically, and no one was willing to risk bending the rules. Fortunately, supplies trucked in through Pakistan often vanish in transit, and US packs are for sale at $2 each in the "Bush bazaar".

On the night, diners chose between food from 11 countries, from Denmark to Spain to Singapore. Most popular was the Italian pack: diners were undoubtedly lured in by the country's culinary reputation, and the surprise addition of a splash of grappa – the only alcohol on offer. Second were the French, who once included a carton of red wine, but now serve only dry rations. One surprise was the German pack – the meal people were most reluctant to try, but a runaway success thanks to the liver sausage spread and rye bread.

Still, most of the diners weren't moved to renounce conventional cooking. When asked to rate the meal, one wrote, "1 on a scale of 1 to 1,000". The best bit about the meal, he added, was "that I did not have to eat it". Another added, "now I know how it will feel on Mars". But not everyone went home hungry and disappointed. "Tasteful but impractical in wartime," said one woman after polishing off, of course, a French meal.

• The Kabul dinner was a charity event to raise funds for two different types of school. School of Leadership, Afghanistan, aims to train a new generation of leaders for a country that lost most of its educated elite to decades of war. The Afghan Schools Trust has built basic schoolhouses in the poorest and often conservative rural areas; some of their graduates, children of illiterate parents, are now studying in India and Italy.

Italy

Italian Army ration pack. Photograph: Sarah Lee for the Guardian

The Italian ration pack contains a breakfast shot of 40% alcohol cordiale, a powdered cappuccino, lots of biscotti, and a disposable camping stove for heating parts of the meal, including a pasta and bean soup, canned turkey and a rice salad. Dessert is a power sport bar, canned fruit salad or a muesli chocolate bar.

France

French Army ration pack.

A streamlined but sophisticated French ration pack offers soldiers deer pâté, cassoulet with duck confit, creole-style pork and a crème chocolate pudding. There is also a disposable heater, some coffee and flavoured drink powder, muesli for breakfast and a little Dupont d'Isigny caramel.

Germany

German Army ration pack. Photograph: S

The German ration pack contains several sachets of grapefruit and exotic juice powder to add to water, and Italian biscotti, but also more familiar treats such as liver-sausage spread and rye bread, goulash with potatoes, and for breakfast sour cherry and apricot jams.

UK

British Army ration pack.

The British pack is dotted with familiar brands from Kenco coffee and Typhoo tea to a mini bottle of Tabasco. The main courses include the British favourite, chicken tikka masala, and a vegetarian pasta. There's also pork and beans for breakfast, and lots of sweets and snacks from trail mix to an apple "fruit pocket" that looks like it might not be out of place in a school lunchbox. Plus packets of Polos and, of course, plenty of teabags.

Australia

Australian Army ration pack. Photograph: Sarah Lee for the Guardian

The Australian ration pack has more small treats than any of the others. Most of it is packaged by the military, from a serving of love-it-or-hate-it Vegemite to jam sandwich biscuits and a tube of sweetened condensed milk. The bag includes a can-opener-cum-spoon for getting at the Fonterra processed cheddar cheese, and main meals of meatballs and chilli tuna pasta. There are lots of sweets and soft drinks, and two unappetising-looking bars labelled "chocolate ration".

Spain

Spanish ration pack Photograph: Sarah Lee for the Guardian

The Spanish lunch pack has cans of green beans with ham, squid in vegetable oil, and pate. There is also a sachet of powdered vegetable soup, peach in syrup for dessert and crackers handed out to go with the meal in place of bread (not shown). There is a disposable heater with matches and fuel tabs, as well as lots of tablets: Vitamin C, glucose, water purification, and rehydration.

US

US Army ration pack. Photograph: Sarah Lee for the Guardian

Almond poppy seed pound cake, cranberries, spiced apple cider (the hot US non-alcoholic drink) and peanut butter and crackers make up this very American meal package. The main – pasta with vegetable "crumbles" in spicy tomato sauce – is less traditional, but the "flameless heater" shows off American tech skills – just add water to the powder in a plastic bag and it heats up enough to warm the plastic meal pouch.

Canada

Following photographs: David Levene for the Guardian

While there are Bear Paws snacks in the Canadian ration pack, there's the shocking omission of maple syrup. You have the choice of salmon fillet with Tuscan sauce or vegetarian couscous for the main meal. There is also the makings of a peanut butter and jelly (raspberry jam) sandwich for breakfast.

Norway

Danish Army ration pack. Photograph: Sarah Lee for the Guardian

The Norwegian pack has American technology (the flameless heater) but British tastes. There is Earl Grey tea, beans and bacon in tomato sauce, a golden oatie biscuit and Rowntree's Tooty Frooties.

Estonia

Estonian Army ration pack. Photograph: David Levene for the Guardian

Stuffed peppers, chicken-meat pâté, smoked sprats, and liver sausage with potatoes make an eclectic menu here. Plus, crispbreads on the side, and halva with vanilla for dessert. Breakfast is muesli, a fruit pocket and honey.

Singapore

Singapore ration pack Photograph: Sarah Lee for the Guardian

The offerings in the Singapore pack were sparse despite its reputation for high-quality cuisine. There were a paltry three dishes, of Szechuan chicken noodles; a mushroom, basil, rice and chicken dish; and soya milk with red-bean dessert [ see footnote].

• This footnote was appended on 19 February 2014. The Singapore pack is, in fact, only the main pack. In addition each Singaporean soldier receives an "accessory" pack as part of a 24-hour ration package, which includes canned drinks, energy bars, isotonic drinks powder, tinned food, instant noodles, biscuits, "candy", instant tea and coffee, tissue paper, and heating packs.