Skip to content

Conversation

@jlebon
Copy link
Member

@jlebon jlebon commented Jun 20, 2022

The real repo is in src/config-git in a subdir setup and src/config
is just a relative symlink to the subdir in question.

This should allow us to use subdirs in the CI of openshift/os for
different RHEL/CentOS versions.

Long-term, we should probably move away from subdirs into something more
structured that doesn't require symlinking everything into the subdirs.

We want to retain a symlink to the top-level dir itself.
Prep for future patch.

While we're here, drop `-r`. We want `src/config` to always be exactly a
symlink to `config-git/${subdir}`.
jlebon added 2 commits June 20, 2022 14:16
In those situations, it's expected that `src/config` is a relative
symlink to a subdir in `src/config-git`.
…if present

The real repo is in `src/config-git` in a subdir setup and `src/config`
is just a relative symlink to the subdir in question.

This should allow us to use subdirs in the CI of openshift/os for
different RHEL/CentOS versions.

Long-term, we should probably move away from subdirs into something more
structured that doesn't require symlinking everything into the subdirs.
@jlebon jlebon force-pushed the pr/subdir-fixes branch from ea260eb to 28e6c5f Compare June 20, 2022 18:16
@jlebon
Copy link
Member Author

jlebon commented Jun 20, 2022

I tested this with FCOS locally using:

diff --git a/mysubdir/fedora.repo b/mysubdir/fedora.repo
new file mode 120000
index 00000000..6e70b00b
--- /dev/null
+++ b/mysubdir/fedora.repo
@@ -0,0 +1 @@
+../fedora.repo
\ No newline at end of file
diff --git a/mysubdir/image-base.yaml b/mysubdir/image-base.yaml
new file mode 120000
index 00000000..c6c81978
--- /dev/null
+++ b/mysubdir/image-base.yaml
@@ -0,0 +1 @@
+../image-base.yaml
\ No newline at end of file
diff --git a/mysubdir/image.yaml b/mysubdir/image.yaml
new file mode 120000
index 00000000..73c5b031
--- /dev/null
+++ b/mysubdir/image.yaml
@@ -0,0 +1 @@
+../image.yaml
\ No newline at end of file
diff --git a/mysubdir/live b/mysubdir/live
deleted file mode 120000
index e69de29b..00000000
diff --git a/mysubdir/manifest.yaml b/mysubdir/manifest.yaml
new file mode 100644
index 00000000..a89f57e2
--- /dev/null
+++ b/mysubdir/manifest.yaml
@@ -0,0 +1 @@
+include: ../manifest.yaml
diff --git a/mysubdir/overlay.d b/mysubdir/overlay.d
new file mode 120000
index 00000000..bdc0a4ca
--- /dev/null
+++ b/mysubdir/overlay.d
@@ -0,0 +1 @@
+../overlay.d
\ No newline at end of file
diff --git a/mysubdir/tests b/mysubdir/tests
deleted file mode 120000
index e69de29b..00000000

And then:

$ export FORCE_UNPRIVILEGED=1
$ cosa init ~/Code/gh/c/fcos mysubdir
$ cosa fetch
Using manifest: /srv/fcos/worktrees/test/src/config/manifest.yaml
...

@jlebon jlebon mentioned this pull request Jun 20, 2022
@jlebon
Copy link
Member Author

jlebon commented Jun 23, 2022

Closing in favour of #2934.

@jlebon jlebon closed this Jun 23, 2022
@jlebon jlebon deleted the pr/subdir-fixes branch April 22, 2023 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant