how to download src ?

Hello evrybody,

In first I french’boy, sorry one Day, speak english…

I have old dual core, i want build gcc, kernel, and more .

how to in zypper or rpm, automaticités download evry software installent in my conputer ?
it’s make the script in /var/log/zypper, or I’ve the fonction in zypper ?

thanck from help me


In YaST look at “Patterns” - “Development”: “Base”, “C/C++”, “Development for Linux kernel”, …

@Svyatko described how to install the tools like gcc and make to compile C.
Available source packages are identified with “source” in their names.

You may instead be interested in looking up the OBS (Open Build Service) projects for each package you’re interested in, and if you want your own, clone a copy for your own.

You’ll probably find better answers by posting this kind of question in the Development/OBS Forum



I dont want use the obs, i want to self build.
It’s first to french peuple propose .

if you’ve tip’s, thanck


Hi and welcome to the Forum :slight_smile:
Ensure the source repository is enabled “repo-source” I would suggest with zypper to use download only, or just visit the url and grab the src rpms?

What I understand from his question is that he has bunch of “ready to use” packages installed on his system (like we all have). He now wants all the source packages that belong to those packages installed in one go (so not say,hey I have package xterm, let us go and install source package xterm).

Something like enabling the source repo, then go there and see marked as such all source packages that have an equivalent package installed. And as consequence you can then say: select all those for installation and Go.

You need the ‘/usr/src/linux/README.SUSE’ file, which is part of the “kernel-source” package – you’ll also need the “kernel-macros”, “kernel-devel” and, “kernel-default-devel” packages.

  • As the SUSE ReadMe states:

  (2)  Create a build directory for use in configuring and building
       the kernel. Using /usr/src/linux directly requires root priviledges
       and will cause problems if you need to build kernel modules for
       other installed kernels.

In other words –

  • ‘/usr/src/’ is a system directory;
  • create a “Build” directory in a User Partition with enough space –

 > du -hs .
20G     .
 > pwd

Yes – 19.2 GiB needed to build the 5.3.18-lp152.57 Kernel …

Catch-22 – you’ll be building a kernel which doesn’t have any security keys – you can not boot it with UEFI/BIOS Security enabled …

He did not ask anything about the Kernel or building the Kernel. He asked for all sources belonging to all packages he has installed on his system. I think that narrowing down answers to “how to build a kernel” is going off topic.

Hello evrybody,

That’s true !

I’ve in Yast, make active thé dépôt source, but press ok don’t download src, m’y be in the .zypper configure file i’ve easy solution ?
Or I wanted script from read the evry Line in the file /var/log/zypper, and alter download by wget ?

I’m to loose, it’s old Time use RedHat, i’ve make just one option, it’s automaticly get , why’s the change ?



What you want is not implemented.
The idea is that when you want to install the source of a package, you can do so from the source repo.
You can not “mass” install. I do not thing there is somebody else that wants that. People that need sources, need them from a few products they want to work on.

As it is impossible to work on “all” products, nobody thought about making such a “mass” installation possible.


Mon français n’est pas tres bon.

Parce que aucune personne veut travailler (inspecter, corriger, traduire) avec tout les sources, ce possibilité n’est pas implementé.

C’est possible de désigner un script (bash) pour construire une liste des paquets installés et de converter cette liste en une liste de commands “zypper install <nom-de paquet>.src.rmp”. Ton traveaux domestiques :wink:


that’s not implemented, ok in OBSD, i sure it’s ready to 3.2 !

ok somémany problem, it’s’possible people Côme phisicaly to m’y home ?

some i ´ve : 0.000000] Linux version 5.3.18-lp152.19-default (geeko@buildhost) (gcc version 7.5.0 (SUSE Linux)) #1 SMP Tue Jun 9 20:59:24 UTC 2020 (960cb00)

where the hash key sha256, from this ? That’s don’t beta ?

it’s btrfs partition /home, how to down protection ?



subsidiary ask, do you’ve iso to dvd script by Linux magazine in uk ?

If you describe what you’re trying to do, maybe someone can suggest how to best do it.
One paragraph summary of what you’re trying to do.
Might include either an example or a partial example of what you’re trying to do.
Expected result.

For example
If you don’t want to use OBS
We have Kiwi which is a way to do more or less the same thing on your own machine…


I think I might have a handle on what the OP is asking (obviously the OP can confirm or correct what follows). Is it possible that the OP is trying to do a Gentoo or BSD kind of setup/installation where a minimal amount of software (mainly the main system stuff, of course, and anything needed to compile) is installed, and the rest is downloaded, compiled for that hardware, and installed?