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

[FIX] Use the apt-archive for postgres in versions using buster #623

Closed

Conversation

PabloEForgeFlow
Copy link
Contributor

Just like when stretch was archived #528. I haven't found an official announcement but the error speaks for itself:

#4 33.00 doodba INFO: Executing: ['apt-get', 'update']
#4 33.05 Get:1 http://deb.debian.org/debian buster InRelease [122 kB]
#4 33.05 Get:2 http://security.debian.org/debian-security buster/updates InRelease [34.8 kB]
#4 33.07 Get:3 http://deb.debian.org/debian buster-updates InRelease [56.6 kB]
#4 33.10 Ign:4 http://apt.postgresql.org/pub/repos/apt buster-pgdg InRelease
#4 33.13 Err:5 http://apt.postgresql.org/pub/repos/apt buster-pgdg Release
#4 33.13   404  Not Found [IP: 87.238.57.227 80]
#4 33.19 Get:6 http://security.debian.org/debian-security buster/updates/main amd64 Packages [610 kB]
#4 33.32 Get:7 http://deb.debian.org/debian buster/main amd64 Packages [7909 kB]
#4 33.45 Get:8 http://deb.debian.org/debian buster-updates/main amd64 Packages [8788 B]
#4 34.42 Reading package lists...
#4 34.99 E: The repository 'http://apt.postgresql.org/pub/repos/apt buster-pgdg Release' does not have a Release file.

Also, buster-pgdg can be found in https://apt-archive.postgresql.org/pub/repos/apt/dists/index.html but not in https://apt.postgresql.org/pub/repos/apt/dists/.

@PabloEForgeFlow
Copy link
Contributor Author

Oops, just realized that #622 already deals with the issue in v14. Closing this one, but note that v13 is affected as well.

@zamberjo
Copy link

IMHO this PR is more complete, as it includes all builds of the buster version.

@josep-tecnativa
Copy link
Contributor

Same for me. This PR is more complete

@josep-tecnativa
Copy link
Contributor

@PabloEForgeFlow did you test this changes?

@PabloEForgeFlow
Copy link
Contributor Author

I did test on a particular v13 deployment we have, but did not run the doodba tests themselves.

@ap-wtioit
Copy link
Contributor

Failing test seems to be in the refactored merge test:

(INFO) [09:23:50] git_aggregator.repo  odoo   Fetching required remotes
fatal: detected dubious ownership in repository at '/tmp/fake-odoo/.git'
To add an exception for this directory, call:

	git config --global --add safe.directory /tmp/fake-odoo/.git
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
(ERROR) [09:23:50] git_aggregator.repo  odoo   /opt/odoo/custom/src/odoo> error calling ('git', 'fetch', '--depth', '100', 'local', 'branch1')
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/git_aggregator/main.py", line 230, in aggregate_repo
    repo.aggregate()
  File "/usr/local/lib/python3.10/site-packages/git_aggregator/repo.py", line 183, in aggregate
    self.fetch()
  File "/usr/local/lib/python3.10/site-packages/git_aggregator/repo.py", line 248, in fetch
    self.log_call(cmd, cwd=self.cwd)
  File "/usr/local/lib/python3.10/site-packages/git_aggregator/repo.py", line 160, in log_call
    ret = callwith(cmd, **kw)
  File "/usr/local/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '('git', 'fetch', '--depth', '100', 'local', 'branch1')' returned non-zero exit status 128.
Traceback (most recent call last):
  File "/usr/local/bin/autoaggregate", line 170, in <module>
    aggregate(REPOS_YAML)
  File "/usr/local/bin/autoaggregate", line 72, in aggregate
    check_call(
  File "/usr/local/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['gitaggregate', '--expand-env', '--config', '/opt/odoo/custom/src/repos.yaml', '--log-level', 'INFO', '--jobs', '4', 'aggregate']' returned non-zero exit status 1.

It seems like a newer git version needs /tmp/fake-odoo to be marked as safe:
https://github.com/Tecnativa/doodba/blob/master/tests/scaffoldings/repo_merge/custom/build.d/099-create-fake-odoo#L6

@pedrobaeza
Copy link
Member

Included in #624

@pedrobaeza pedrobaeza closed this Sep 27, 2024
@ananiasfilho
Copy link

ananiasfilho commented Nov 26, 2024

Need update imagem. Now is necessary the new path
From https://apt-archive.postgresql.org/:
Archive of all released packages on apt.postgresql.org
The archive also contains all versions of all packages that have been part of some DIST-pgdg distribution on apt.postgresql.org. These distributions are called DIST-pgdg-archive here. The archive is updated daily; the Packages/Sources files contain all versions at once.
/etc/apt/sources.list entry for the archive repository:

deb https://apt-archive.postgresql.org/pub/repos/apt DIST-pgdg-archive main
deb-src https://apt-archive.postgresql.org/pub/repos/apt DIST-pgdg-archive main

@pedrobaeza @PabloEForgeFlow

@pedrobaeza
Copy link
Member

Please do a PR changing that.

@ap-wtioit
Copy link
Contributor

@ananiasfilho can you post your issue as a new issue with log output here.

The page you linked also mentions:

Distribution releases are moved here from apt.postgresql.org after they have been EOLed by Debian or Ubuntu. The distributions retain their original DIST-pgdg name.

As we are using Debian based base images this should work without the -archive suffix. (Also our CI passed today for all images so it seems unlikely we need a change here)

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.

6 participants