wimpysworld / deb-get

apt-get for .debs published via GitHub or direct download 📦
MIT License
1.3k stars 123 forks source link

[HELP WANTED] Can't add External Repository #709

Closed Anderhar closed 1 year ago

Anderhar commented 1 year ago

While experimenting with deb-get on Ubuntu 22.10, I decided to try it on Ubuntu Cleaner as a neat example of an unsupported application.

My first approach:

  1. Create /etc/deb-get/99-gerardpuig.repo
  2. Fill it out with the line ppa:gerardpuig/ppa
  3. Execute sudo deb-get update
  4. Execute sudo deb-get install ubuntu-cleaner Result: ERROR! ubuntu-cleaner is not a supported application

My second approach:

  1. Create /etc/deb-get/99-local.d/ubuntu-cleaner
  2. Fill it out with the lines
    DEFVER=1
    PPA="ppa:gerardpuig/ppa"
    PRETTY_NAME="Ubuntu Cleaner"
    WEBSITE="https://github.com/gerardpuig/ubuntu-cleaner"
    SUMMARY="A tool that makes it easy to clean your ubuntu system."
  3. Execute sudo deb-get update
  4. Execute sudo deb-get install ubuntu-cleaner Result: ERROR! ubuntu-cleaner is not a supported application

I've tried several times with minor variations, reboots, clearing the deb-get cache and reinstalling the deb-get package in different ways - all in vain.

Am I doing something wrong, or is there something wrong with the deb-get itself?

philclifford commented 1 year ago

You're close but not quite there @Anderhar .

First: don't sudo deb-get - it will elevate permissions as needed . Next - I copied your second approach and here's the result : (some output removed for simplicity)

$ cat /etc/deb-get/99-local.d/ubuntu-cleaner
DEFVER=1
PPA="ppa:gerardpuig/ppa"
PRETTY_NAME="Ubuntu Cleaner"
WEBSITE="https://github.com/gerardpuig/ubuntu-cleaner"
SUMMARY="A tool that makes it easy to clean your ubuntu system."

$ deb-get show ubuntu-cleaner
  [...]
  [+] Including local package ubuntu-cleaner
  [!] Please consider contributing back new entries, an issue (or raise a PR) directly at https://github.com/wimpysworld/deb-get/pulls
Ubuntu Cleaner
  Package:  ubuntu-cleaner
  Repository:   99-local
  Updater:  apt
  Installed:    No
  Architecture: amd64
  Launchpad:    ppa:gerardpuig/ppa
  Website:  https://github.com/gerardpuig/ubuntu-cleaner
  Summary:  A tool that makes it easy to clean your ubuntu system.

$ deb-get install ubuntu-cleaner
   [...]
  [+] Including local package ubuntu-cleaner
  [!] Please consider contributing back new entries, an issue (or raise a PR) directly at https://github.com/wimpysworld/deb-get/pulls
  [+] Upating: /etc/apt/sources.list.d/gerardpuig-ubuntu-ppa-kinetic.list
Get:1 https://ppa.launchpadcontent.net/gerardpuig/ppa/ubuntu kinetic InRelease [18.1 kB]
Get:2 https://ppa.launchpadcontent.net/gerardpuig/ppa/ubuntu kinetic/main i386 Packages [500 B]
Get:3 https://ppa.launchpadcontent.net/gerardpuig/ppa/ubuntu kinetic/main amd64 Packages [500 B]
Get:4 https://ppa.launchpadcontent.net/gerardpuig/ppa/ubuntu kinetic/main Translation-en [188 B]
Fetched 19.2 kB in 1s (25.0 kB/s)                            
Reading package lists... Done
Selecting previously unselected package ubuntu-cleaner.
[...]

$ deb-get show ubuntu-cleaner
  [...]
Ubuntu Cleaner
  Package:  ubuntu-cleaner
  Repository:   99-local
  Updater:  apt
  Installed:    1.1.4-1
  Architecture: amd64
  Launchpad:    ppa:gerardpuig/ppa
  Website:  https://github.com/gerardpuig/ubuntu-cleaner
  Summary:  A tool that makes it easy to clean your ubuntu system.

So all works as you expected with the second approach using the latest (HEAD of main) deb-get and without unwanted sudo

For the first approach you need to create the .repo file with a URL to the repo as the first line (simplest is just that URL) . Avoid starting it 99- (leave that for the local override / method 2 approach). So for example :

echo "https://raw.githubusercontent.com/philclifford/deb-get/extras/90-contribs" | sudo tee /etc/deb-get/90-contribs.repo

should allow you to deb-get update and then find your ubuntu-cleaner is available via that repo (once you remove the override from 99-local)

$ deb-get show ubuntu-cleaner
  [...]  
Ubuntu Cleaner
  Package:  ubuntu-cleaner
  Repository:   90-contribs
  Updater:  apt
  Installed:    1.1.4-1

When you update with just the 90-contribs.repo containing the URL deb-get will replace the .repo with the manifest at the URL and then use that to populate the directory from the manifest.

Hopefully this smooths your path to submitting a PR for ubuntu-cleaner if you wish. I'd better go look at what I just installed. Thanks and best wishes. Any problems please get back here or in discord.

Anderhar commented 1 year ago

Thanks for the fast response! Seems that yesterday I misunderstood the first approach (with the external repository), but correctly followed the second approach (with the local override), so at this time I just repeated my steps again with your recommendation regarding sudo (copy-pasting the entries from your post to be sure). Unfortunately, nothing has changed, and my first guess is that deb-get just ignores /etc/deb-get catalog.

P.S. Happy New Year!

philclifford commented 1 year ago

Most perplexing! deb-get will (reliably in my experience at least ;-) ) find and use files in the override location (/etc/deb-get/99-local.d/ so long as the filename matches the app name exactly. You can check by copying an app file in there from /etc/deb-get/01-main.d/ and then doing a deb-get show <the-app-you-copied> , which should warn about using a duplicate definition etc and show the source repo as "99-local". Did you git clone the latest from main (or just grab deb-get from github)? Did you try adding my extra repo ?

This must be very frustrating. Hopefully it will soon give in to gentle persuasion.

And a very Happy New Year to you too! :fireworks:

Anderhar commented 1 year ago

I copied audio-recorder from downloaded deb-get/01-main/packages/ to /etc/deb-get/99-local.d/, then ran deb-get update and deb-get show audio-recorder. The tool behaves as if nothing had happened: no warnings, no line "Repositories" in the output at all:

$ deb-get show audio-recorder
Audio-Recorder
  Package:  audio-recorder
  Updater:  apt
  Installed:    No
  Architecture: amd64
  Launchpad:    ppa:audio-recorder/ppa
  Website:  https://launchpad.net/~audio-recorder
  Summary:  Audio recording app that allows for the recording from various sources such as microphones, a system's sound card, or a web browser, and save it to various possible formats.

Then I repeated the same thing with the atom from non-Launchpad repository this time:

$ deb-get show atom
Atom
  Package:  atom
  Updater:  apt
  Installed:    No
  Architecture: amd64
  Repository:   deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main
  Website:  https://atom.io/
  Summary:  A hackable text editor for the 21st Century.

So far it looks as if deb-get really does not recognize the contents of /etc/deb-get/99-local.d/. Maybe I should take another try on Ubuntu 22.04 LTS... Thankfully I'm experimenting in WM.

And answering your questions, I have tried installing deb-get in two ways: primarily with the command from the README, and also from the manually downloaded .deb. As for adding external repositories, I didn't go that way anymore. because it doesn't seem to fit my intended usage model (I think), so I decided to focus on the local override approach.

Anderhar commented 1 year ago

Performed a clean installation of Ubuntu 22.04 LTS in WM and tried again - everything is the same. Тotally confused.

philclifford commented 1 year ago

Me too :shrug:

Do you get errors/unexpected output on deb-get update? If you do deb-get list do you get a list of ~225 packages ending in zotero? What is the output of cat /etc/os-release;deb-get version ; deb-get cache;deb-get list ? (maybe better in a gist than here)

With the latest release if the upstreams break us by changing their website or release behaviour then until a fix is released (or done locally with another repo or the 99-local override) things go a bit wrong. I keep my 22.04 and 22.10 ubuntu-mate machines happy using fixes (that are in pending PRs currently for insync and stremio)

   $ head -1 /etc/deb-get/91-fixes.repo
  https://raw.githubusercontent.com/philclifford/deb-get/extras/91-fixes

and also some local overrides . If you're seeing errors and the list is shortened that could be the kind of problem area. You could try that 91-fixes.repo (it can take 2 updates and maybe a clean to get untangled).

Anderhar commented 1 year ago

No errors/unexpected outputs, but the list of apps is really a bit short: only 195 items instead of +230:

$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

$ deb-get version
0.3.6

$ deb-get cache
total 112K
-rw-r--r-- 1 root root 112K јан  1 22:40 deb-get.json

$ deb-get list
1password
android-messages-desktop
antimicrox
anydesk
appimagelauncher
atom
audio-recorder
azure-cli
azuredatastudio
balena-etcher-electron
bat
battery-monitor
beersmith3
bitwarden
bitwig-studio
blanket
blockbench
bluejeans-v2
bottom
brave-browser
brisqi
caprine
cawbird
chronograf
code
codium
com.github.tkashkin.gamehub
copyq
crossover
cryptomator
dbeaver-ce
deadbeef
deb-get                         [ installed ]
deborah
deltachat-desktop
discord
docker-ce
docker-desktop
draw.io
dropbox
du-dust
duf
dustracing2d
element-desktop
enpass
exodus
expressvpn
fd
figma-linux
firefox-esr
flameshot
foliate
franz
fsearch
geforcenow-electron
gh
git-delta
github-desktop
gitkraken
gitter
google-chat-electron
google-chrome-stable
google-cloud-cli
google-earth-pro-stable
gpu-viewer
grype
helio-workstation
heroic
hugo
hyper
igdm
influxdb
influxdb2
influxdb2-cli
insomnia
insync
irccloud-desktop
jabref
jami
jellyfin
kapacitor
kdiskmark
keepassxc
keybase
kopia-ui
ksnip
lens
librewolf
lsd
ludo
lutris
mailspring
mattermost-desktop
mergerfs
micro
microsoft-edge-stable
min
minigalaxy
minikube
motrix
mpdevil
ms-office-electron
mullvad-vpn
neo4j
neovim
nextcloud-desktop
nomad
nordvpn
notable
obs-cli
obsidian
obs-studio
ocenaudio
onlyoffice-desktopeditors
openaudible
openrazer-meta
openrgb
opera-stable
p3x-onenote
pandoc
papirus-icon-theme
parsec
peazip
picocrypt
plexmediaserver
plow
polychromatic
portmaster
powershell
protonmail-bridge
protonvpn
pulse-sms
qownnotes
quickemu
quickgui
rambox
rclone
resilio-sync
retroarch
rocketchat
rpi-imager
rstudio
rustdesk
sejda-desktop
shutter-encoder
signal-desktop
simplenote
skypeforlinux
slack-desktop
sleek
smartgit
softmaker-office-2021
soundux
spotify-client
standard-notes
strawberry
stremio
sublime-merge
sublime-text
surfshark
syft
syncthing
system-monitoring-center
tailscale
teams
teams-for-linux
teamviewer
telegraf
terraform
texworks
tidal-hifi
tixati
tribler
trivy
typora
ubuntu-make
ulauncher
virtualbox-6.1
vivaldi-stable
vuescan
wavebox
waydroid
webex
weechat
weylus
whalebird
whatsapp-for-linux
wire-desktop
xemu
youtube-music
yq
zenith
zettlr
zoom
zotero

I also tried rolling back to the 0.2.1, but this also has no positive result. As if there is something preventing deb-get from knowing that /etc/deb-get exists...

philclifford commented 1 year ago

Unless it's simply permissions (maybe from earlier use of sudo but maybe not ) .... it could be possible that e.g. a restrictive umask setting at creation has left you where your uid doesn't see /etc/deb-get/99-local.d/

If this looks reasonable then I'm stumped.

find /etc/deb-get -type d -ls
Anderhar commented 1 year ago

Can't help suspecting that I'm just doing something wrong and don't understand that, given that I'm alone with this problem. Maybe a syntax mistake or misunderstanding of the instructions...

$ find /etc/deb-get/ -type d -ls
  2884307      4 drwxr-xr-x   3 root     root         4096 jan  2 19:50 /etc/deb-get/
  2885934      4 drwxr-xr-x   2 root     root         4096 jan  2 19:52 /etc/deb-get/99-local.d
flexiondotorg commented 1 year ago

The GitHub issue tracker is not for support requests. Please join our Discord if you have questions about using deb-get.