A theory of bundles over posets