Write the maintainer marker into published directories
Every directory under a release carries a CURRENT_MAINTAINER naming the support address, which the PostgreSQL mirror network expects and which the buildfarm wrote with an echo in each of nine job definitions. The rehearsal produced a release directory without them. It is a file beside the scripts now, so changing the support address is one reviewed commit.
This commit is contained in:
3
pkg/publish/CURRENT_MAINTAINER
Normal file
3
pkg/publish/CURRENT_MAINTAINER
Normal file
@@ -0,0 +1,3 @@
|
||||
Support: pgadmin-support@lists.postgresql.org
|
||||
Website: https://www.pgadmin.org/
|
||||
Tracker: https://github.com/pgadmin-org/pgadmin4/issues
|
||||
@@ -30,6 +30,7 @@ which verbs exist.
|
||||
| `install-repo-readme.py` | Write the README at the top of an APT or YUM tree |
|
||||
| `README.apt.in`, `README.yum.in` | The prose those READMEs are built from |
|
||||
| `aptftp.conf` | `apt-ftparchive` settings: Origin, Label, Suite, Description |
|
||||
| `CURRENT_MAINTAINER` | The marker the PostgreSQL mirror network expects in each published directory |
|
||||
| `pga-publish` | The forced-command wrapper |
|
||||
| `authorized_keys.procyon`, `authorized_keys.paxsor` | Annotated templates for the two servers |
|
||||
| `selftest.sh` | Exercises the wrapper's parser without touching anything |
|
||||
@@ -47,7 +48,8 @@ On both servers, as root:
|
||||
install -d -m 755 /usr/local/lib/pga-publish
|
||||
install -m 755 rebuild-apt-repo.sh rebuild-yum-repo.sh install-repo-readme.py \
|
||||
/usr/local/lib/pga-publish/
|
||||
install -m 644 aptftp.conf README.apt.in README.yum.in /usr/local/lib/pga-publish/
|
||||
install -m 644 aptftp.conf README.apt.in README.yum.in CURRENT_MAINTAINER \
|
||||
/usr/local/lib/pga-publish/
|
||||
install -m 755 pga-publish /usr/local/sbin/pga-publish
|
||||
```
|
||||
|
||||
|
||||
@@ -835,10 +835,30 @@ def cmd_release_create(args, raw):
|
||||
refuse_if_exists(root, "publication location already exists")
|
||||
makedirs(root)
|
||||
for name in RELEASE_CONTENT_DIRS:
|
||||
makedirs(under(root, name))
|
||||
target = under(root, name)
|
||||
makedirs(target)
|
||||
write_maintainer(target)
|
||||
print("created %s" % root)
|
||||
|
||||
|
||||
def write_maintainer(directory):
|
||||
"""Drop the maintainer marker the PostgreSQL mirror network expects.
|
||||
|
||||
Fixed content, held as a file beside the scripts rather than echoed inline
|
||||
as the buildfarm did, so that changing the support address is a reviewed
|
||||
commit rather than an edit to nine job definitions.
|
||||
"""
|
||||
src = os.path.join(PUBLISH_DIR, "CURRENT_MAINTAINER")
|
||||
dst = os.path.join(directory, "CURRENT_MAINTAINER")
|
||||
if DRY_RUN:
|
||||
print("would copy: %s -> %s" % (src, dst))
|
||||
return
|
||||
if not os.path.isfile(src):
|
||||
sys.stderr.write("pga-publish: missing %s\n" % src)
|
||||
sys.exit(EX_UNAVAILABLE)
|
||||
shutil.copyfile(src, dst)
|
||||
|
||||
|
||||
def cmd_release_fetch(args, raw):
|
||||
"""release-fetch <VERSION> <DATESTAMP>
|
||||
|
||||
@@ -918,6 +938,7 @@ def cmd_autoupdate_publish(args, raw):
|
||||
sys.exit(EX_UNAVAILABLE)
|
||||
|
||||
makedirs(AUTOUPDATE_DIR)
|
||||
write_maintainer(AUTOUPDATE_DIR)
|
||||
if not DRY_RUN:
|
||||
for stale in sorted(os.listdir(AUTOUPDATE_DIR)):
|
||||
if stale.endswith(".zip"):
|
||||
|
||||
Reference in New Issue
Block a user