3 title: Download Packages
5 https://raw.githubusercontent.com/automotive-grade-linux/docs-sources/master/agl-documentation/host-configuration/docs/2-download-packages.md
8 <!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/devguides/master/host-configuration-developer-guides-devguides-book.yml -->
12 Different repositories exist for different AGL releases.\
13 You need to download and install the packages based on your version
16 ## Set the `REVISION` Environment Variable
18 All the packages reside in repositories managed by the
19 [OpenSUSE Build Service (OBS)](https://build.opensuse.org/).\
20 You can see the packages
21 [here](https://build.opensuse.org/project/subprojects/isv:LinuxAutomotive#).
23 Currently, support exists for the following AGL releases:
31 You need to set the `REVISION` environment variable to the AGL release you
33 For this example, set and export `REVISION` as "Master".
36 export REVISION=Master
39 For additional details about OBS, see
40 [LinuxAutomotive page on OBS](https://build.opensuse.org/project/show/isv:LinuxAutomotive).
42 ## Make Sure Your `DISTRO` Environment Variable is Set
44 The `DISTRO` environment variable needs to be correctly set for your
47 "[Verify Your Build Host](./1-verify-build-host.html)"
48 section for information on how to set this variable.
50 ## Install the Repository
53 Hit:1 https://deb.nodesource.com/node_10.x xenial InRelease
54 Hit:2 https://download.docker.com/linux/ubuntu xenial InRelease
55 Hit:3 http://security.ubuntu.com/ubuntu xenial-security InRelease
56 Hit:4 http://us.archive.ubuntu.com/ubuntu xenial InRelease
57 Ign:5 http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/AGL_FunkyFlounder/xUbuntu_16.04 ./ InRelease
58 Hit:6 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease
59 Hit:7 http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/AGL_FunkyFlounder/xUbuntu_16.04 ./ Release
60 Hit:8 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease
61 Reading package lists... Done
64 Not sure why you get the `Ign` on line 5.\
65 I guess InRelease does not exist.
67 If you don't have a `/etc/apt/sources.list.d/AGL.list` file to even start with,
68 and you run through the whole thing, you get the following output:
72 Hit:1 https://deb.nodesource.com/node_10.x xenial InRelease
73 Hit:2 https://download.docker.com/linux/ubuntu xenial InRelease
74 Hit:3 http://us.archive.ubuntu.com/ubuntu xenial InRelease
75 Get:4 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
76 Get:5 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
77 Ign:6 http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/AGL_FunkyFlounder/xUbuntu_16.04 ./ InRelease
78 Hit:7 http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/AGL_FunkyFlounder/xUbuntu_16.04 ./ Release
79 Get:9 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
80 Get:10 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [902 kB]
81 Fetched 1,225 kB in 1s (803 kB/s)
82 Reading package lists... Done
85 Following are example commands that show how to install the package repository
86 based on various values of `DISTRO` and `REVISION`:
88 ### Ubuntu and "Master"
91 export REVISION=Master
92 export DISTRO="xUbuntu_18.04"
93 wget -O - http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/AGL_${REVISION}/${DISTRO}/Release.key | sudo apt-key add -
94 sudo bash -c "cat >> /etc/apt/sources.list.d/AGL.list <<EOF
96 deb http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/AGL_${REVISION}/${DISTRO}/ ./
101 You can see the installed repository using the following command:
104 cat /etc/apt/sources.list.d/AGL.list
107 ### OpenSUSE and "Master"
110 export DISTRO="openSUSE_Leap_15.0"
111 export REVISION=Master
112 source /etc/os-release; export DISTRO=$(echo $PRETTY_NAME | sed "s/ /_/g")
113 sudo zypper ar http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/AGL_${REVISION}/${DISTRO}/isv:LinuxAutomotive:AGL_${REVISION}.repo
114 sudo zypper --gpg-auto-import-keys ref
117 You can see the installed repository using the following command:
120 zypper repos | grep AGL
123 ### Fedora and "Master"
126 export DISTRO="Fedora_28"
127 export REVISION=Master
128 source /etc/os-release ; export DISTRO="${NAME}_${VERSION_ID}"
129 sudo wget -O /etc/yum.repos.d/isv:LinuxAutomotive:AGL_${REVISION}.repo http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/AGL_${REVISION}/${DISTRO}/isv:LinuxAutomotive:AGL_${REVISION}.repo
132 You can see the installed repository using the following command:
135 dnf repolist --all | grep AGL
138 ## Switching Between Repositories
140 The commands in the previous section showed you how to install the packages
141 from a specific repository and how to verify whether or not the packages
142 are enabled or disabled.
143 You can switch between different repositories.
144 You must disable your current AGL repository and then enable the repository
145 designated for the switch.
147 Following is an example for Debian distributions:
149 ### Example for Debian distro
151 Suppose you are on "master" and you want the "ElectricEel" AGL revision.
155 export NEWR=ElectricEel
156 sudo sed -i "s/${OLDR}/${NEWR}/g" /etc/apt/sources.list.d/AGL.list
160 ### Example for openSuse distro
163 # | Alias | Name | Enabled | GPG Check | Refresh
164 ---+-------------------------------------+-------------------------------------------------------------------------------------------+---------+-----------+--------
165 1 | Atom | Atom Editor | Yes | (r ) Yes | No
166 2 | code | Visual Studio Code | Yes | (r ) Yes | No
167 3 | http-ftp.uni-erlangen.de-e3cebb6d | Packman Repository | Yes | (r ) Yes | Yes
168 4 | isv_LinuxAutomotive_AGL_ElectricEel | isv:LinuxAutomotive:AGL_ElectricEel (openSUSE_Leap_15.0) | Yes | (r ) Yes | No
169 5 | isv_LinuxAutomotive_AGL_Master | Automotive Grade Linux Application Development tools - master branch (openSUSE_Leap_15.0) | No | ---- | ----
170 6 | openSUSE-Leap-15.0-1 | openSUSE-Leap-15.0-1 | No | ---- | ----
171 7 | repo-debug | openSUSE-Leap-15.0-Debug | No | ---- | ----
172 8 | repo-debug-non-oss | openSUSE-Leap-15.0-Debug-Non-Oss | No | ---- | ----
173 9 | repo-debug-update | openSUSE-Leap-15.0-Update-Debug | No | ---- | ----
174 10 | repo-debug-update-non-oss | openSUSE-Leap-15.0-Update-Debug-Non-Oss | No | ---- | ----
175 11 | repo-non-oss | openSUSE-Leap-15.0-Non-Oss | Yes | (r ) Yes | Yes
176 12 | repo-oss | openSUSE-Leap-15.0-Oss | Yes | (r ) Yes | Yes
177 13 | repo-source | openSUSE-Leap-15.0-Source | No | ---- | ----
178 14 | repo-source-non-oss | openSUSE-Leap-15.0-Source-Non-Oss | No | ---- | ----
179 15 | repo-update | openSUSE-Leap-15.0-Update | Yes | (r ) Yes | Yes
180 16 | repo-update-non-oss | openSUSE-Leap-15.0-Update-Non-Oss | Yes | (r ) Yes | Yes
183 Now, you want your "master" repository enabled.
184 In the above output, the "ElectricEel" repository is at the fourth line
185 and the "master" repository is at the fifth line.
186 Thus, enter the following:
189 $ sudo zypper mr -d 4 && sudo zypper mr -e 5
190 Repository 'isv_LinuxAutomotive_AGL_ElectricEel' has been successfully disabled.
191 Repository 'isv_LinuxAutomotive_AGL_Master' has been successfully enabled.
195 **NOTE:** In the previous command, the "-d" option is used for "disable" and the
196 "-e" option is used for "enable".
198 Following are the results:
201 # | Alias | Name | Enabled | GPG Check | Refresh
202 ---+-------------------------------------+-------------------------------------------------------------------------------------------+---------+-----------+--------
203 1 | Atom | Atom Editor | Yes | (r ) Yes | No
204 2 | code | Visual Studio Code | Yes | (r ) Yes | No
205 3 | http-ftp.uni-erlangen.de-e3cebb6d | Packman Repository | Yes | (r ) Yes | Yes
206 4 | isv_LinuxAutomotive_AGL_ElectricEel | isv:LinuxAutomotive:AGL_ElectricEel (openSUSE_Leap_15.0) | No | ---- | ----
207 5 | isv_LinuxAutomotive_AGL_Master | Automotive Grade Linux Application Development tools - master branch (openSUSE_Leap_15.0) | Yes | (r ) Yes | No
208 6 | openSUSE-Leap-15.0-1 | openSUSE-Leap-15.0-1 | No | ---- | ----
209 7 | repo-debug | openSUSE-Leap-15.0-Debug | No | ---- | ----
210 8 | repo-debug-non-oss | openSUSE-Leap-15.0-Debug-Non-Oss | No | ---- | ----
211 9 | repo-debug-update | openSUSE-Leap-15.0-Update-Debug | No | ---- | ----
212 10 | repo-debug-update-non-oss | openSUSE-Leap-15.0-Update-Debug-Non-Oss | No | ---- | ----
213 11 | repo-non-oss | openSUSE-Leap-15.0-Non-Oss | Yes | (r ) Yes | Yes
214 12 | repo-oss | openSUSE-Leap-15.0-Oss | Yes | (r ) Yes | Yes
215 13 | repo-source | openSUSE-Leap-15.0-Source | No | ---- | ----
216 14 | repo-source-non-oss | openSUSE-Leap-15.0-Source-Non-Oss | No | ---- | ----
217 15 | repo-update | openSUSE-Leap-15.0-Update | Yes | (r ) Yes | Yes
218 16 | repo-update-non-oss | openSUSE-Leap-15.0-Update-Non-Oss | Yes | (r ) Yes | Yes
221 ### Example for Fedora distro
224 isv_LinuxAutomotive_AGL_FunkyFlounder isv:LinuxAutomotive:AGL disabled
225 isv_LinuxAutomotive_AGL_Master Automotive Grade Linux enabled
228 The following commands enable the "ElectricEel" repository:
231 dnf config-manager --set-disabled isv_LinuxAutomotive_AGL_Master
232 dnf config-manager --set-enabled isv_LinuxAutomotive_AGL_FunkyFlounder
236 $ dnf repolist --all | grep AGL
237 isv_LinuxAutomotive_AGL_FunkyFlounder isv:LinuxAutomotive:AGL enabled
238 isv_LinuxAutomotive_AGL_Master Automotive Grade Linux disabled