apt-get: Add SMB to the valid Uri methods for software repositories

Bug #231806 reported by Zebra-Rake
2
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

1. I want to use my ubuntu 8.04.iso mounted via an linux SMB share in my apt sources list. I used https://help.ubuntu.com/community/Repositories/Ubuntu for info and instructions, so I updated my sources list to include 'deb smb://10.10.10.66/ hardy main restricted' (a valid and accessible smb share on my network). When I reload my sources, I get the following error in a pop up window: " The method driver /usr/lib/apt/methods/smb could not be found. "

I looked at the man file for sources.list and didn't see SMB as a valid URI specification? Did smb get 'dropped' for some reason as a valid way to access repos or is there a way to add it to the methods section?

 Thanks,
  Dylan

Ref:
ls -la /usr/lib/apt/methods/
total 392
drwxr-xr-x 2 root root 4096 2008-05-12 17:47 .
drwxr-xr-x 3 root root 4096 2008-05-12 17:47 ..
-rwxr-xr-x 1 root root 15076 2008-04-22 08:21 bzip2
-rwxr-xr-x 1 root root 19404 2008-04-22 08:21 cdrom
-rwxr-xr-x 1 root root 11268 2008-04-22 08:21 copy
-rwxr-xr-x 1 root root 12292 2008-04-22 08:21 file
-rwxr-xr-x 1 root root 55836 2008-04-22 08:21 ftp
-rwxr-xr-x 1 root root 24708 2008-04-22 08:21 gpgv
-rwxr-xr-x 1 root root 15076 2008-04-22 08:21 gzip
-rwxr-xr-x 1 root root 55432 2008-04-22 08:21 http
-rwxr-xr-x 1 root root 15076 2008-04-22 08:21 lzma
-rwxr-xr-x 1 root root 71920 2008-04-22 08:21 mirror
-rwxr-xr-x 1 root root 15552 2008-04-22 08:21 rred
-rwxr-xr-x 1 root root 22516 2008-04-22 08:21 rsh
-rwxr-xr-x 1 root root 22516 2008-04-22 08:21 ssh

cat /etc/apt/sources.list

deb-src http://archive.ubuntu.com/ubuntu/ hardy main restricted
deb http://us.archive.ubuntu.com/ubuntu/ hardy main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy restricted main multiverse universe #Added by software-properties
deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates restricted main multiverse universe #Added by software-properties
deb http://us.archive.ubuntu.com/ubuntu/ hardy universe
deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse
deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
deb http://us.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu hardy partner
deb-src http://archive.canonical.com/ubuntu hardy partner
deb http://security.ubuntu.com/ubuntu hardy-security main restricted
deb-src http://security.ubuntu.com/ubuntu hardy-security restricted main multiverse universe #Added by software-properties
deb http://security.ubuntu.com/ubuntu hardy-security universe
deb http://security.ubuntu.com/ubuntu hardy-security multiverse
deb http://us.archive.ubuntu.com/ubuntu/ hardy-proposed restricted main multiverse universe
deb http://download.skype.com/linux/repos/debian/ stable non-free

deb smb://10.10.10.66/ubuntu_804_intel_32bit/ hardy restricted main

#the smb above is the valid SMB share from my linux server
#it is a mounted loop iso image file and shared out in samba, I see it readily via network shares.

This is the exact readout when doing a sources reload:
The method driver /usr/lib/apt/methods/smb could not be found.The method driver /usr/lib/apt/methods/smb could not be found.

Revision history for this message
Brian Murray (brian-murray) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at https://wiki.ubuntu.com/Bugs/FindRightPackage . I have classified this bug as a bug in apt.

Michael Vogt (mvo)
Changed in apt:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Zebra-Rake (faheyd) wrote :

Been a year, any updates?

Revision history for this message
Julian Andres Klode (juliank) wrote :

We never had any smb support in APT.

Revision history for this message
Zebra-Rake (faheyd) wrote :

@julian
We're not looking for reasons to 'not' do it, we are looking for implementation of a requested feature. Think positive. It can't be that hard. And don't ask me to do it, I'm a user. We depend on you 'smart' people to help us out.
Thanks,
Dylan

Revision history for this message
Zebra-Rake (faheyd) wrote :

Almost 3 years, what is this, the U.N. ?

Revision history for this message
Julian Andres Klode (juliank) wrote :

I just responded to "Did smb get 'dropped' for some reason as a valid way to access repos or is there a way to add it to the methods section?". I do not have any wish to add smb support to apt. If you really, really, want to, you can mount the smb share as a CIFS volume and then use file:/ or copy:/ uris.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Just in case anyone really wants to add something like this: The easiest way would probably be to go via GIO and gvfs.

Revision history for this message
Zebra-Rake (faheyd) wrote :

@julian, I don't know who you are, but if you don't have any to contribute to this request, AND YOU DON'T, please just delete your comments. We're trying to get something added, not debate some other way of getting it done. We know there are other ways of doing it, but this bug report is to request SMB support, it's not for you to suggest some other way to get it done.
Can we stay on topic and get any movement forward on this?

Revision history for this message
Julian Andres Klode (juliank) wrote :

You don't have anything to contribute. I offered a you a solution that works right now (and should be very very fast, as it's in the kernel) and hints for everyone wanting to program support for smb:// urls on where to start, that is, by using the GIO library which includes via GVFS support for having applications access smb:// urls, amongst various other types of urls, and is used by GNOME applications like Nautilus (the files browser) for all file access.

I am thus only offering constructive feedback. If you don't realise this, than that's your problem. We have 3 people actively working on APT-related stuff, mostly in free-time (except for mvo where it's probably mostly work-time). I just let you know that this 1/3 is not interested in it (as it's a Microsoft protocol), and offered the other 2/3 and the outsiders the hints for starting to work on this.

Revision history for this message
Zebra-Rake (faheyd) wrote :

apt-get: Add SMB to the valid Uri methods for software repositories

Any progress on this after 3 years?

Revision history for this message
David Kalnischkies (donkult) wrote :

No, as apparently nobody is interested in implementing it. But feel free to find someone who is interested. apt-transport-debtorrent shows that out-of-tree methods can be done, you just need someone to do it…

And we are not the U.N. as Julian already said, we are three people working on APT. The U.N. has properly more people doing stuff. The only similarity is that more people complain about and demand stuff than doing something useful to get even remotely closer to the target. But in this sense, properly every open source project is like what you think the U.N. is … or, strike open source here and place in 'every free-time voluntary activity'…

Just as a hint: You don't increase your chances to find one if you start your sentence with 'I want' and complain loudly about missing progress on your personal pet-feature. It's not that it is the end of the known universe to not have smb. Especially as well-working workarounds exist…

Revision history for this message
Fuujuhi (fuujuhi) wrote :

Just passing by to confirm that the cifs + file method works fine.

Only make sure that the samba share is mounted world readable (otherwise apt sandbox will complain).

And use one single slash on the file: line, for instance:

    deb file:/smb/someserver/deb path/to/repo/

This would assumes that your *.deb files are available on /smb/someserver/deb/path/to/repo/ from the local machine perspecitve.

I find this is the best method to access a repo on a file server, since you likely don't want to mess up the apt config with how you access the samba shares (user name, password, etc).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.