I once got a 10KG sack of rice from an Asian store once. After a year it got full of tiny bugs less than 1mm in size. Now I buy 1kg bags that I can more easily seal airtight with pegs.
For bulk foods, like grains, you can use aluminized polyester film bags, and blow in pure nitrogen or drop in an oxygen-absorber packets while sealing the bag. Then you put the bags in a food-grade bucket and seal it. The bags can have resealable zip-locks on them.
Yes, this uses plastic, but all of it is reusable when using certain bag-sealing methods.