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

OBS project repos do not work w/ apt-file #10952

Open
drmuey opened this issue Mar 29, 2021 · 5 comments
Open

OBS project repos do not work w/ apt-file #10952

drmuey opened this issue Mar 29, 2021 · 5 comments
Labels
Backend Things regarding the OBS backend

Comments

@drmuey
Copy link

drmuey commented Mar 29, 2021

OBS project repos do not work w/ apt-file

Packages made by OBS do not show up for apt-file (even w/ apt update) because OBS does not generate a Contents file.

Expected Result

apt-file should work w/ OBS project repos

How to Reproduce

  1. Build a package on OBS, say, on home:whatever:whatever w/ xUbuntu_20.04 enabled

  2. Do this on an Ubuntu 20.04 server:

  3. configure the project ➜

# cat /etc/apt/sources.list.d/home\:whatever\:whatever.list
deb [ allow-insecure=yes trusted=yes ] https://your.internal.build.server.test:444/home:/whatever:/whatever/xUbuntu_20.04/ ./
#
  1. import that repo’s key
  2. apt update ➜ the internal one is updated, no Ign no W or E
  3. ✅ dpkg -S /path/to/a/file/that/my-pkg/owns
  4. ❌ apt-file search /path/to/a/file/that/my-pkg/owns
  5. ✅ dpkg -L my-pkg # need to strip intermediate paths …
  6. ❌ apt-file list my-pkg

Further Information

  • apt-file $? is 1, which, from apt-file man page that means ➜ apt-file completed a search successfully, but it had no results.
  • From what I can tell it is because the repo has no Contents file
  • If so, that means apt-ftparchive contents . > Contents && gzip -9 < Contents > Contents.gz needs to happen in createrepo_debian() (probably near the end if not last)
    ** could be opt in so people are not surprised by it but those of us that need it could have it
@drmuey
Copy link
Author

drmuey commented Mar 30, 2021

Confirmed that the cause of apt-file having no results for an OBS repo is almost certainly due to missing Contents file 👍

Details at nthykier/apt-file#2

thanks!

@Conan-Kudo
Copy link
Member

This doesn't work because dpkg-scanpackages(1) does not provide a way to do so.

@nickbroon
Copy link
Contributor

This doesn't work because dpkg-scanpackages(1) does not provide a way to do so.

Is there a particular reason OBS uses dpkg-scanpackages? Could it switch to apt-ftparchive instead?

From the apt-ftparchive manpage:

apt-ftparchive is a superset of the dpkg-scanpackages(1) program, incorporating its entire functionality via the packages command. It also contains a contents file generator, contents, and an elaborate means to 'script' the generation process for a complete archive.
https://manpages.debian.org/bullseye/apt-utils/apt-ftparchive.1.en.html

@Conan-Kudo
Copy link
Member

Conan-Kudo commented Sep 28, 2021

Mostly because nobody knows about it and apt is not packaged in openSUSE. 😅

@nickbroon
Copy link
Contributor

nickbroon commented May 24, 2024

Ah, no 'apt' in opensuse, that's a real shame. I see a very old 'apt' package lingering at https://build.opensuse.org/project/show/system:packagemanager but factory doesn't appear to have it anymore. 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Things regarding the OBS backend
Projects
None yet
Development

No branches or pull requests

4 participants