  Long-duration gamma-ray bursts (LGRBs) and ultra-LGRBs (ULGRBs) originate
from collapsars, in the center of which a newborn rotating stellar-mass black
hole (BH) surrounded by a massive accretion disk may form. In the scenario of
BH hyperaccretion inflow-outflow model and Blandford-Znajek (BZ) mechanism to
trigger gamma-ray bursts (GRBs), the real accretion rate to power a BZ jet is
far lower than the mass supply rate from the progenitor star. The
characteristics of the progenitor stars can be constrained by GRB luminosity
observations, and the results exceed usual expectations. LGRBs lasting from
several seconds to tens of seconds in the rest frame may originate from
solar-metallicity ($Z \sim 1~ Z_\odot$, where $Z$ and $Z_\odot$ are the
metallicities of progenitor stars and the Sun), massive ($M \gtrsim 34
~M_\odot$, where $M$ and $M_\odot$ are the masses of progenitor stars and the
Sun) stars or some zero-metallicity ($Z \sim 0$) stars. A fraction of
low-metallicity ($Z \lesssim 10^{-2}~Z_\odot$) stars, including Population III
stars, can produce ULGRBs such as GRB 111209A. The fraction of LGRBs lasting
less than tens of seconds in the rest frame is more than 40$\%$, which cannot
conform to the fraction of the demanded type of progenitor star. It possibly
implies that the activity timescale of central engine may be much longer than
the observed timescale of prompt emission phase, as indicated by X-ray
late-time activities. Alternatively, LGRBs and ULGRBs may be powered by a
millisecond magnetar central engine.
