debian-pi / raspbian-ua-netinst

Raspbian (minimal) unattended netinstaller
Other
1.17k stars 153 forks source link

what sources for apt? #499

Closed oupala closed 6 years ago

oupala commented 7 years ago

I compared installed source from an official raspbian and from a raspbian unattended netinstaller.

It appears that sources differs:

> cat /etc/apt/sources.list
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi

> cat /etc/apt/sources.list.d/raspi.list
deb http://archive.raspberrypi.org/debian/ jessie main ui
>cat /etc/apt/sources.list  
deb http://mirrordirector.raspbian.org/raspbian jessie main contrib non-free firmware  

>cat /etc/apt/sources.list.d/raspberrypi.org.list  
deb http://archive.raspberrypi.org/debian jessie main  

I then have a few questions:

kpfleming commented 7 years ago

The reason there are two repositories is that some packages are produced by the Raspberry Pi Foundation, they are not part of Raspbian.

oupala commented 7 years ago

Ok, that makes sense.

Is there a place where I can get som more information? Maybe what are the packages made by the Raspberry Pi foundation?

And that does not explain what there is differences between section in the same repo (firmware vs rpi, and ui only one one distro).

Mausy5043 commented 7 years ago

firmware contains all libraspberrypi* packages and the raspberrypi-bootloader-nokernel package that we need.

rpi contains only three packages: gstreamer1.0-omx gstreamer1.0-omx-dbg ssh-regen-startup. We don't need those.

ui is only useful for desktop GUIs. We don't need those either.

The RaspberryPi Foundation's forums are a good place to go if you're looking for info on their software.

oupala commented 7 years ago

@Mausy5043 Do you have any idea why the firmware section is not included on a default raspbian installation? Is it useless? Or dangerous?

I'm asking me this question because I'm currently installing and configuring the unattended-upgrades package. And there is sometime some packages that are not upgraded by unattended-upgrades.

Currently, it is these 2 packages:

libraspberrypi-bin/stable 1.20170703-1 armhf [upgradable from: 1.20170427-1~nokernel1]
libraspberrypi0/stable 1.20170703-1 armhf [upgradable from: 1.20170427-1~nokernel1]

Should I included the section for this packages in automatic upgrades?

And by the way, I had already asked this question in the RaspberryPi Foundation's forums: what sources for apt?.

Mausy5043 commented 7 years ago

Your /etc/apt/sources.list should contain:

deb http://mirrordirector.raspbian.org/raspbian jessie main contrib non-free firmware 
Mausy5043 commented 7 years ago

The RPF uses their own kernel and therefore doesn't need the packages in firmware from raspbian.org.

We use the raspbian.org kernel and need the packages in firmware.

oupala commented 7 years ago

Ok, thanks for your answers.

Here are my configured sources:

>apt-cache policy | grep release
     release a=now
     release o=Raspberry Pi Foundation,a=stable,n=jessie,l=Raspberry Pi Foundation,c=main
     release o=Raspbian,a=stable,n=stretch,l=Raspbian,c=firmware
     release o=Raspbian,a=stable,n=stretch,l=Raspbian,c=main
     release o=Raspbian,a=oldstable,n=jessie,l=Raspbian,c=firmware
     release o=Raspbian,a=oldstable,n=jessie,l=Raspbian,c=non-free
     release o=Raspbian,a=oldstable,n=jessie,l=Raspbian,c=contrib
     release o=Raspbian,a=oldstable,n=jessie,l=Raspbian,c=main

And here is my unattended-upgrades configuration file:

Unattended-Upgrade::Origins-Pattern {
    "o=Raspbian,n=jessie";
};

I think that firmware, non-free, contrib and main should be included in unattended-upgrades upgrades.

oupala commented 7 years ago

Some details about upgradeable packages:

>apt-cache policy libraspberrypi0
libraspberrypi0:
  Installé : 1.20170427-1~nokernel1
  Candidat : 1.20170703-1
  Épinglage de paquet : 1.20170427-1~nokernel1
 Table de version :
     1.20170703-1 800
        900 http://archive.raspberrypi.org/debian/ jessie/main armhf Packages
 *** 1.20170427-1~nokernel1 800
        900 http://mirrordirector.raspbian.org/raspbian/ jessie/firmware armhf Packages
        -10 http://mirrordirector.raspbian.org/raspbian/ stretch/firmware armhf Packages
        100 /var/lib/dpkg/status
>apt-cache policy libraspberrypi-bin
libraspberrypi-bin:
  Installé : 1.20170427-1~nokernel1
  Candidat : 1.20170703-1
  Épinglage de paquet : 1.20170427-1~nokernel1
 Table de version :
     1.20170703-1 800
        900 http://archive.raspberrypi.org/debian/ jessie/main armhf Packages
 *** 1.20170427-1~nokernel1 800
        900 http://mirrordirector.raspbian.org/raspbian/ jessie/firmware armhf Packages
        -10 http://mirrordirector.raspbian.org/raspbian/ stretch/firmware armhf Packages
        100 /var/lib/dpkg/status

I don't understand why both packages from archive.raspberrypi.org are not installed by unattended-upgrades.

I think I should add the following configuration my unattended-upgrades configuration file:

    "o=Raspberry Pi Foundation,n=jessie";

Any thoughts about that?

Mausy5043 commented 7 years ago

Ref this commit: https://github.com/debian-pi/raspbian-ua-netinst/commit/0a0dfc468d9badec366c516f06095ebc8e5450e7

Note also the Pin-Priority

Mausy5043 commented 6 years ago

Assuming question is answered. Closing