#90 Make the list of repos empty in the default inherit chain
Merged 6 years ago by ausil. Opened 6 years ago by puiterwijk.
puiterwijk/fedora-atomic f26-uut  into  f26

@@ -0,0 +1,145 @@ 

+ {

+     "ref": "fedora/26/${basearch}/atomic-host",

+ 

+     "repos": [],

+ 

+     "selinux": true,

+ 

+     "documentation": false,

+ 

+     "automatic_version_prefix": "26",

+     "mutate-os-release": "26",

+ 

+     "initramfs-args": ["--no-hostonly", "--add", "iscsi"],

+ 

+     "install-langs-comment": "Keep this in sync with treecompose-post.sh",

+     "install-langs": [

+       "pt_BR",

+       "fr",

+       "fr_FR",

+       "de",

+       "de_DE",

+       "it",

+       "it_IT",

+       "ru",

+       "ru_RU",

+       "es",

+       "es_ES",

+       "en_US",

+       "zh_CN",

+       "ja",

+       "ja_JP",

+       "ko",

+       "ko_KR",

+       "zh_TW",

+       "as",

+       "as_IN",

+       "bn",

+       "bn_IN",

+       "gu",

+       "gu_IN",

+       "hi",

+       "hi_IN",

+       "kn",

+       "kn_IN",

+       "ml",

+       "ml_IN",

+       "mr",

+       "mr_IN",

+       "or",

+       "or_IN",

+       "pa",

+       "pa_IN",

+       "ta",

+       "ta_IN",

+       "te",

+       "te_IN"

+     ],

+ 

+     "postprocess-script": "treecompose-post.sh",

+ 

+     "etc-group-members": ["wheel", "docker"],

+ 

+     "ignore-removed-users": ["root"],

+     "ignore-removed-groups": ["root"],

+     "check-passwd": { "type": "file", "filename": "passwd" },

+     "check-groups": { "type": "file", "filename": "group" },

+ 

+     "packages": ["atomic",

+          "glibc", "nss-altfiles", "shadow-utils",

+          "sssd-client", "libsss_sudo",

+          "fedora-release-atomichost",

+          "dracut-config-generic", "kernel",

+          "dracut-network",

+          "rpm-ostree", "lvm2",

+          "chrony",

+          "cryptsetup",

+          "authconfig",

+          "btrfs-progs", "e2fsprogs", "xfsprogs",

+          "gnupg2",

+          "basesystem",

+          "python",

+          "bash",

+          "xz", "gzip", "bzip2",

+          "coreutils",

+          "bridge-utils",

+          "which",

+          "nfs-utils",

+          "microcode_ctl",

+          "curl",

+          "iptables-services", "iptables",

+          "NetworkManager",

+          "dnsmasq",

+          "hostname", "initscripts", "iproute", "iputils", "less",

+          "sos",

+          "openssh-clients", "openssh-server", "passwd",

+          "policycoreutils", "procps-ng", "rootfiles", "rpm",

+          "selinux-policy-targeted", "setup", "shadow-utils",

+          "sudo", "systemd", "util-linux", "vim-minimal",

+          "less",

+          "tar",

+          "cloud-init",

+          "cloud-utils-growpart",

+          "rsync",

+          "bash-completion",

+          "tmux", "screen",

+          "strace", "lsof", "tcpdump", "nmap-ncat",

+          "policycoreutils-python",

+          "policycoreutils-python-utils",

+          "setools-console",

+          "audit",

+          "cockpit-bridge",

+          "cockpit-system",

+          "cockpit-docker",

+          "cockpit-networkmanager",

+          "cockpit-ostree",

+          "kubernetes", "etcd",

+          "flannel",

+          "docker",

+          "python-docker-py",

+          "iscsi-initiator-utils",

+          "glusterfs", "glusterfs-fuse",

+          "ceph-common",

+          "oddjob-mkhomedir",

+          "oci-register-machine",

+          "oci-systemd-hook",

+          "mdadm",

+          "runc",

+          "attr"],

+ 

+     "packages-aarch64": ["grub2-efi", "ostree-grub2",

+                          "efibootmgr", "shim", "atomic-devmode"],

+ 

+     "packages-armhfp": ["extlinux-bootloader"],

+ 

+     "packages-ppc64": ["grub2", "ostree-grub2", "atomic-devmode"],

+ 

+     "packages-ppc64le": ["grub2", "ostree-grub2", "atomic-devmode"],

+ 

+     "packages-x86_64": ["grub2", "grub2-efi", "ostree-grub2",

+                          "efibootmgr", "shim", "atomic-devmode"],

+ 

+     "default_target": "multi-user.target",

+ 

+     "units": ["docker.service", "cockpit.socket", "docker-storage-setup.service"]

+ }

@@ -1,4 +1,5 @@ 

  {

      "ref": "fedora/26/${basearch}/updates/atomic-host",

-     "include": "fedora-atomic-host.json"

+     "include": "fedora-atomic-host-base.json",

+     "repos": []

  }

@@ -1,4 +1,5 @@ 

  {

      "ref": "fedora/26/${basearch}/testing/atomic-host",

-     "include": "fedora-atomic-host.json"

+     "include": "fedora-atomic-host-base.json",

+     "repos": []

  }

file modified
+3 -143
@@ -1,145 +1,5 @@ 

  {

-     "ref": "fedora/26/${basearch}/atomic-host",

- 

-     "repos": ["fedora-26", "fedora-26-updates"],

- 

-     "selinux": true,

- 

-     "documentation": false,

- 

-     "automatic_version_prefix": "26",

-     "mutate-os-release": "26",

- 

-     "initramfs-args": ["--no-hostonly", "--add", "iscsi"],

- 

-     "install-langs-comment": "Keep this in sync with treecompose-post.sh",

-     "install-langs": [

-       "pt_BR",

-       "fr",

-       "fr_FR",

-       "de",

-       "de_DE",

-       "it",

-       "it_IT",

-       "ru",

-       "ru_RU",

-       "es",

-       "es_ES",

-       "en_US",

-       "zh_CN",

-       "ja",

-       "ja_JP",

-       "ko",

-       "ko_KR",

-       "zh_TW",

-       "as",

-       "as_IN",

-       "bn",

-       "bn_IN",

-       "gu",

-       "gu_IN",

-       "hi",

-       "hi_IN",

-       "kn",

-       "kn_IN",

-       "ml",

-       "ml_IN",

-       "mr",

-       "mr_IN",

-       "or",

-       "or_IN",

-       "pa",

-       "pa_IN",

-       "ta",

-       "ta_IN",

-       "te",

-       "te_IN"

-     ],

- 

-     "postprocess-script": "treecompose-post.sh",

- 

-     "etc-group-members": ["wheel", "docker"],

- 

-     "ignore-removed-users": ["root"],

-     "ignore-removed-groups": ["root"],

-     "check-passwd": { "type": "file", "filename": "passwd" },

-     "check-groups": { "type": "file", "filename": "group" },

- 

-     "packages": ["atomic",

-          "glibc", "nss-altfiles", "shadow-utils",

-          "sssd-client", "libsss_sudo",

-          "fedora-release-atomichost",

-          "dracut-config-generic", "kernel",

-          "dracut-network",

-          "rpm-ostree", "lvm2",

-          "chrony",

-          "cryptsetup",

-          "authconfig",

-          "btrfs-progs", "e2fsprogs", "xfsprogs",

-          "gnupg2",

-          "basesystem",

-          "python",

-          "bash",

-          "xz", "gzip", "bzip2",

-          "coreutils",

-          "bridge-utils",

-          "which",

-          "nfs-utils",

-          "microcode_ctl",

-          "curl",

-          "iptables-services", "iptables",

-          "NetworkManager",

-          "dnsmasq",

-          "hostname", "initscripts", "iproute", "iputils", "less",

-          "sos",

-          "openssh-clients", "openssh-server", "passwd",

-          "policycoreutils", "procps-ng", "rootfiles", "rpm",

-          "selinux-policy-targeted", "setup", "shadow-utils",

-          "sudo", "systemd", "util-linux", "vim-minimal",

-          "less",

-          "tar",

-          "cloud-init",

-          "cloud-utils-growpart",

-          "rsync",

-          "bash-completion",

-          "tmux", "screen",

-          "strace", "lsof", "tcpdump", "nmap-ncat",

-          "policycoreutils-python",

-          "policycoreutils-python-utils",

-          "setools-console",

-          "audit",

-          "cockpit-bridge",

-          "cockpit-system",

-          "cockpit-docker",

-          "cockpit-networkmanager",

-          "cockpit-ostree",

-          "kubernetes", "etcd",

-          "flannel",

-          "docker",

-          "python-docker-py",

-          "iscsi-initiator-utils",

-          "glusterfs", "glusterfs-fuse",

-          "ceph-common",

-          "oddjob-mkhomedir",

-          "oci-register-machine",

-          "oci-systemd-hook",

-          "mdadm",

-          "runc",

-          "attr"],

- 

-     "packages-aarch64": ["grub2-efi", "ostree-grub2",

-                          "efibootmgr", "shim", "atomic-devmode"],

- 

-     "packages-armhfp": ["extlinux-bootloader"],

- 

-     "packages-ppc64": ["grub2", "ostree-grub2", "atomic-devmode"],

- 

-     "packages-ppc64le": ["grub2", "ostree-grub2", "atomic-devmode"],

- 

-     "packages-x86_64": ["grub2", "grub2-efi", "ostree-grub2",

-                          "efibootmgr", "shim", "atomic-devmode"],

- 

-     "default_target": "multi-user.target",

- 

-     "units": ["docker.service", "cockpit.socket", "docker-storage-setup.service"]

+     "ref": "fedora/26/${basearch}/testing/atomic-host",

+     "include": "fedora-atomic-host-base.json",

+     "repos": ["fedora-26", "fedora-26-updates"]

  }

This basically moves the bulk of the tree definition to a -base, and just the repos back to the fedora-atomic-host.json.
The reason for this is that this way, if Pungi injects the correct repos, it won't still have the repos from the base.

I've confirmed that with this change, the "repos" field in the updates-*.json files takes effect as expected (and per documentation, which says that treefiles get lists appended from their bases).

rebased onto cfe724f

6 years ago

Pull-Request has been merged by ausil

6 years ago

I'm not opposed to this but...again the reason I chose JSON was precisely so that tools like pungi or whatever could easily override the repos field dynamically.

@walters And that is exactly what Pungi does.
Unfortunately, the problem is that right now, Pungi does not allow me to override the ref, and that is what I need overridden (Dusty has an RFE for that. As soon as that gets fixed, I'll revert all these changes and use that).

The problem with Pungi's editing of "repos" in this "downstream" file (atomic-host-updates-*.json) is that, as per documentation, lists get appended. So given that the base already had repos in it, the injected repos were appended to the already existing ones, while they needed to be fully overridden (without the old ones).

Yeah it's fine, again I'm not objecting. But I thought what we had with fedmsg-atomic-composer before was a bit nicer in that it overrode both the ref and the repos fields in the single file. So once Pungi learns to do that I think that'd be a bit nicer.

Anyways, no worries, the changes LGTM.

Oh, yeah, I totally agree with that when Pungi can override ref, that's way nicer (I would not even say "a bit").

i'm pretty sure pungi already has support for overriding the repos.

Example here. You can see it only picks up rpms from one repo: Fedora-27-20171022.n.0-Everything-20171022114659.

We pass --extra-config=/mnt/koji/compose/branched/Fedora-27-20171022.n.0/work/ostree-3/extra_config.json(link) to pungi which has the effect of overriding the repos. The final config (after replacement) is here. The original (with a .bak extension) is here.

@dustymabe Yes, it overrides the repos.
But the problem is that Pungi only changes atomic-host-updates-testing.json.
But then, that file "include"s atomic-host.json, and if that already has repos, those add added to the ones Pungi inject.
The problem is that the ones that are in the default .repo files in this repository are not usable from within koji builders.

oh ok, so we're saying that the pungi override of repos doesn't work with the change we made yesterday. got it.