Merge pull request #3064 from JanZerebecki/sde-create-release-changes-now
Create .changes files for reproducible builds
This commit is contained in:
commit
a2edca4481
@ -8,6 +8,8 @@ import shutil
|
|||||||
import subprocess
|
import subprocess
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
from datetime import datetime, timezone
|
||||||
|
|
||||||
from typing import Any, Mapping, Optional
|
from typing import Any, Mapping, Optional
|
||||||
|
|
||||||
from lxml import etree as ET
|
from lxml import etree as ET
|
||||||
@ -747,6 +749,22 @@ class PkgListGen(ToolBase.ToolBase):
|
|||||||
|
|
||||||
file_utils.multibuild_from_glob(release_dir, '*.spec')
|
file_utils.multibuild_from_glob(release_dir, '*.spec')
|
||||||
self.build_stub(release_dir, 'spec')
|
self.build_stub(release_dir, 'spec')
|
||||||
|
|
||||||
|
todo_spec_files = []
|
||||||
|
package = Package(release_dir)
|
||||||
|
if package.get_status(False, ' '):
|
||||||
|
todo_spec_files = glob.glob(os.path.join(release_dir, '*.spec'))
|
||||||
|
for spec_file in todo_spec_files:
|
||||||
|
changes_file = os.path.splitext(spec_file)[0] + '.changes'
|
||||||
|
with open(changes_file, 'w', encoding="utf-8") as f:
|
||||||
|
date = datetime.now(timezone.utc)
|
||||||
|
date = date.strftime("%a %b %d %H:%M:%S %Z %Y")
|
||||||
|
f.write(
|
||||||
|
"-------------------------------------------------------------------\n"
|
||||||
|
+ date + " - openSUSE <packaging@lists.opensuse.org>\n\n"
|
||||||
|
"- automatically generated by openSUSE-release-tools/pkglistgen\n\n"
|
||||||
|
)
|
||||||
|
|
||||||
self.commit_package(release_dir)
|
self.commit_package(release_dir)
|
||||||
|
|
||||||
if only_release_packages:
|
if only_release_packages:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user