I make my own pork and beans.
To do this and store them you will need a pressure canner.
I start with two 'pounds' side bacon (although side bacon is not really a pound any more). Slice to dice them before frying, then fry to get most of the fat out of them. Can let cool and break up any big lumps. Often store in fridge overnight.
Soak about two grocery store bags of navy beans overnight very well covered with water in the fridge. They will swell a lot.
Make up sauce of salt, mustard powder, brown sugar, molasses, and add beans and bacon crumbs water to cover, bring to boil, simmer a few hours.
Recipe in almost ever canner book.
Ladle while still hot into 1l glass mason jars not full - say 2" down, add to 1" head space with hot water, process 10lb for about 70 minutes as I recall.
The extra water is because the beans will still swell in the pressure canner and the result without this step will result in beans that will need to be dug out of the jar.
I do this about twice a year.
Nice to eat reheated in the microwave direct in the jar with metal lid removed, as a cold day lunch with hot dogs after coming in from shoveling snow from the driveway and sidewalk, etc.