Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caching essential packages for offline install, #984. #985

Closed
wants to merge 1 commit into from

Conversation

holgerfriedrich
Copy link
Member

  • initial functionality added to build.bash
  • directory prefix for java_zulu_fetch

Signed-off-by: Holger Friedrich [email protected]

@holgerfriedrich holgerfriedrich marked this pull request as draft June 18, 2020 20:14
@ecdye ecdye mentioned this pull request Jun 27, 2020
13 tasks
@holgerfriedrich holgerfriedrich force-pushed the pr-prefetch branch 8 times, most recently from 594c0b2 to 6923152 Compare June 30, 2020 21:55
@mstormi
Copy link
Contributor

mstormi commented Jul 1, 2020

Just tried.
You need to pre-install (clone) /opt/openhabian, installation tries to execute openhabian-setup.sh from there.
Also cross-check with the code almost at the beginning of first-boot.bash where it's sourcing helpers.bash and openhabian.bash.
These are also missing but if /opt/openhabian is there, these files are, too. You need to change the path though.
And remove the paste-helpers.bash-into-first-boot.bash-on-build

Also seems it's missing git. While install does not stop as it did before recent changes but it's quick to skip a major part of the installation
Yeah I also thought it's there but it is not. Could you preinstall that, too ?

@ecdye
Copy link
Member

ecdye commented Jul 1, 2020

Several of those fixes are included in #1008

@mstormi
Copy link
Contributor

mstormi commented Jul 3, 2020

We really should get the new image out asap. See #665 (comment)
that reminds me that first-boot.bash is still that from the time the image was created, including all bugs fixed since such as support of some RPi models.

#1008 now fixes what I wrote in my last comment, and IIRC you said prefetching works now, too ?
Maybe change current PR to store prefetched packages to install at installation time in /var/cache/apt/archives, that's more elegant IMHO.

Please let's finalze this PR this weekend and get the image out.

@holgerfriedrich
Copy link
Member Author

@mstormi latest image build considers your comment regarding git. Not sure if it works on real HW. We may need to shift the code which installs the packages since git seems to be used before it is installed (maybe not a problem at all, because it won't be able to clone anyway in offline mode)
I did not have time to check this out carefully this week. Same for the dependencies which might be missing.

@mstormi
Copy link
Contributor

mstormi commented Jul 3, 2020

are you ok with #1008, can I merge that? Please build another image when that's in so we can test on real HW.

@mstormi
Copy link
Contributor

mstormi commented Jul 7, 2020

My recent attempt with the latest image failed because apt/dpkg complained about a lock when "Updating repositories and upgrading installed packages". I'm not sure it is the only reason but I believe it is because the last action of standard bootup is a systemd timer unit to handle apt cleanup stuff, and this was overlapping with the first apt actions in our install scripts.
So #721 is not just a cosmetic issue.
As you already correctly said a proper fix (rather than delay) would be to use systemd After= setting in our install unit file.
I believe the last timer (it's a systemd unit like all others are, too) which is also the last bootup action to take place (not sure if always, that's possibly depending on HW speed and some coincidence) is apt-daily-upgrade.

I've added After=apt-daily-upgrade.timer to build-image/openhabian-installer.service.

@mstormi mstormi mentioned this pull request Jul 7, 2020
@mstormi
Copy link
Contributor

mstormi commented Jul 9, 2020

So now with 1008 merged, what's left to be done here ?
To recap, Ethan pre-stores Java (which is not apt packages) in /opt/jdk and you can (IMHO should as it's pretty elegant) pre-store .deb's in /var/cache/apt/archive where apt will automatically pick them up.

@holgerfriedrich holgerfriedrich force-pushed the pr-prefetch branch 4 times, most recently from 21b8087 to 4d3ee2e Compare July 9, 2020 22:15
@holgerfriedrich
Copy link
Member Author

@mstormi I had to rebase and resolve conflicts.
Image build works on my local machine, but not in the github action - apt used for downloading the packages seems to ignore target system package lists....

@holgerfriedrich holgerfriedrich force-pushed the pr-prefetch branch 5 times, most recently from 07e4aca to 103edae Compare July 10, 2020 07:59
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 21, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 21, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 21, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 21, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 21, 2020
ecdye added a commit that referenced this pull request Sep 21, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 21, 2020
ecdye added a commit that referenced this pull request Sep 22, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 22, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 23, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 23, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 23, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 23, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 24, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 24, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 24, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 24, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 25, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 25, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 25, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 25, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 25, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 27, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 28, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 28, 2020
ecdye added a commit to ecdye/openhabian that referenced this pull request Sep 30, 2020
mstormi pushed a commit that referenced this pull request Oct 1, 2020
@ecdye ecdye closed this Oct 1, 2020
@mstormi
Copy link
Contributor

mstormi commented Oct 1, 2020

thanks for your efforts!

@holgerfriedrich holgerfriedrich deleted the pr-prefetch branch August 6, 2023 17:13
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.

3 participants