[upstream] update to tag 2.40.0
[packaging] update packaging to 2.40.0