Questions tagged [source]
Everything that includes the source code of Unix programs for example compiling, installing or how to retrieve the code for studying.
359 questions
0
votes
1
answer
92
views
How to wrap source command in tcsh
I need a solution only for tcsh.
Say I have a source file that sources other files which in their turn can source other files. My goal is to track which files were eventually sourced. One way I can do ...
2
votes
1
answer
59
views
Error while building app qman from source with meson
I'm not used to build apps from source and when I do, it's not free from hiccups.
While trying to build the app qman, I was met with this error code:
[1/11] Generating src/config.h with a custom ...
2
votes
1
answer
218
views
Is there a default or recommended directory to store source files ('configure', 'Makefile', etc) of *user* installs?
Suppose I have downloaded the source of some software I want to install just for myself, not system-wide; say Emacs or whatever. Typically the source is downloaded zipped, then it's unzipped in some ...
4
votes
1
answer
243
views
Where can I find the source code to language pack templates?
I was curious to dig a little deeper into this question and realised that I don't know where to look for language pack templates. But beyond basic high-level discussion in locale-gen, I'm at a bit of ...
1
vote
1
answer
82
views
Can you use debuild to only apply patches to source and then exit?
I am trying to build gcc-6 source package on Raspbian stretch; so I do:
apt source gcc-6
cd gcc-6-6.3.0/debian
debuild -b -uc -us
The debuild command starts the full build. Since the build crashes on ...
1
vote
1
answer
162
views
How to find which Debian package might include a given source file?
I would like to debug my application in gdb, however with full sources of some system libraries I might need. For instance, at a certain point in my debug process in gdb, I arrive at a situation like:
...
4
votes
1
answer
317
views
How do I "go back" after installing a locally built package
I have looked around on instruction on how to download debian source package, build them and then installing the resultin deb-file(s), but the one I feel is missing is instruction on how to reverse it ...
0
votes
1
answer
97
views
How to save changes to patch files for kernel headers in `include/linux` using `diff`?
I am trying to hack the Linux kernel and added/modified some header files in include/linux. However, when I generate patch file using diff like:
diff -uprN -X linux/Documentation/dontdiff \
...
0
votes
1
answer
308
views
How to get a copy of libdevmapper 1.02.34 or later?
I am trying to update GRUB 2.06 to 2.12 on an Ubuntu 22.04.4 LTS machine, following the instructions in the INSTALL text file included in the tarball (and at the bottom of the post). Reading through ...
0
votes
0
answers
165
views
OpenDKIM Isn't building with OpenSSL correctly
I am trying to build OpenDKIM from source. For some reason, the build is not supporting SHA-256, even when the OpenSSL version I am building with uses SHA-256. How is this possible ?
I run:
./...
0
votes
0
answers
281
views
Unexpected syntax error in VERSION file when building gettext
I am trying to build the gettext package from source.
When running make I receive an error:
make[5]: Entering directory '/source/gettext-0.22/gettext-tools/libgettextpo'
[..........]
libtool: link: ...
0
votes
1
answer
80
views
How does KD acronym unveils? /usr/include/linux/kd.h
I do understand that it is related to console (a "real" TTY which is at Ctrl+Alt+F[1-9]).
ioctl_console man page lists many KD* prefixed constants. there is also a vt.h in /usr/include/linux ...
6
votes
3
answers
1k
views
How can I temporarily set $PATH and . (source) a file?
Consider this. IFS is set only in the execution of read.
IFS='' read -r REPLY
However, if I do similar with . (source), the variable will be assigned and changed even after the execution of the line ...
0
votes
1
answer
65
views
Can't bind client to local IP, another IP is used silently
Due to a firewall on a server, I need to make all connections to it from a host (Slackware64 linux 14.2, kernel 5.4) using allowed source IP, 10.2.23.1 in this case.
IP addresses on host:
$ ip a
[...]
...
6
votes
4
answers
24k
views
If I have two versions of python3 installed on my machine (ie: 3.11.2 and 3.12), how do I set the default version to use when running python scripts?
I installed the earlier version (3.11.2) normally using apt package manager and the later version (3.12) manually from source. When I execute python scripts like so:
./python_script.py
The script ...
1
vote
1
answer
204
views
How to list packages that have been installed from source in Linux?
I usually use package managers like apt to install packages and then use dpkg to list the packages, that I have installed. Is there any way to get a similar list if I install from source? I saw an ...
1
vote
1
answer
134
views
Changing yum source through Gnome GUI
This might be a silly question, but it puzzles me. I am using Rocky linux version 9.2. I wonder if there is a way to change the yum install source through gnome gui? that is, without using command ...
0
votes
0
answers
221
views
source command not loading all variables
I have file containing 1100 variables. Example,
LOGPATH=/some/path
VARIABLE2=someVALUE
while running source /path/to/file.properties
Only the first set number of variables are being loaded. Is there ...
1
vote
1
answer
83
views
Installing sile from source fails
I am trying to install sile. A Debian package is not provided yet so I decided to build from source. Manual
Install Lua
$ curl -R -O http://www.lua.org/ftp/lua-5.4.6.tar.gz
$ tar -xf lua-5.4.6.tar....
0
votes
1
answer
108
views
Why the struct lsm_id is not present in linux kernel source tree
I am writing an LSM, and I am compiling it using my kernel 6.2.0-20-generic. When I browse the files in /lib/modules/6.2.0-20-generic/build, I can see that there is a struct named lsm_id. But When I ...
0
votes
1
answer
187
views
Is there a way to compile KNOPPIX from source?
Instead of downloading the ISO, is there a way to download all the source packages and compile it locally?
I came across the following URL https://knopper.net/knoppix-sources/ and would like to know ...
0
votes
2
answers
375
views
Commands cannot be located after sourcing a bash script
I have a short bash script cdline that takes two arguments PATHS and LINE and changes directory to the respective LINE in PATHS:
#!/bin/bash
#command for changing directory to that in the given line......
0
votes
1
answer
211
views
adding a Debian repository: what are the pros and cons?
Looking for software, including less free, proprietary style e.g. visual studio code, github-cli, spotify:
What are the downsides and upsides of adding or configuring a Debian repository?
Debian wiki ...
1
vote
0
answers
75
views
minimal instalation for X11R7.7
For the source code available here: https://www.x.org/releases/X11R7.7-RC1/src/, what are the minimal set I should install to get a working enviroment and be able to start it with the command startx?
0
votes
1
answer
55
views
Decanting code in $HOME/.bashrc into a function
I have the following code fragment in my $HOME/.bashrc file:
export RED='\e[0;31m'
export GREEN='\e[0;32m'
export YELLOW='\e[0;33m'
export BLUE='\e[0;34m'
export MAGENTA='\e[0;35m'
export CYAN='\e[0;...
0
votes
1
answer
69
views
Is it possible to process-redirect to source?
I want to watch (and wait) for the processes spawned by a command, I found this answer which seems pretty much exactly what I need. Except that I want the script to be self-contained, so instead of ...
2
votes
1
answer
520
views
Load variables with source with a single line scope
In bash and other shells, I can make same variables have "line scope" by defining it just before a command.
CXX=clang++ ./script.bash
Which I prefer over
export CXX=clang++
./script.bash
...
0
votes
1
answer
802
views
Are there any differences between bullseye and stable?
I was looking at directories in https://deb.debian.org/debian/dists/. By comparing timestamps I could easily tell that bullseye and stable are the same thing. So is there no difference in behavior ...
0
votes
1
answer
308
views
change the kernel version OS [closed]
It is possible to modify the linux kernel,
I have tried to search but I can't find anything related in the source code
I want to modify this line GNU/Linux
I have noticed that there are kernels with ...
1
vote
1
answer
607
views
Use shell script function directly on bash
I have a utilitarian shell script full of goodies and wish to bring them to the bash environment. I used the command source before as analogous to import or include in other languages.
printer.sh
#!/...
1
vote
1
answer
620
views
How would a Linux driver call UEFI firmware presented functionality?
For work I'm learning more about computer architecture and I just finished learning about ACPI. From talking to some other engineers my understanding for something like NVMe is that the OEM is going ...
0
votes
1
answer
713
views
Good practices when installing from sources on Linux
I'm wondering what are good practices about compilation and manual installation of software on Linux systems.
I mean getting, building and installing code by this usual way :
git clone https://a-repo/...
2
votes
2
answers
2k
views
Open new terminal with environment specified by source command
I want to run a command that opens a terminal and sources into it a set of variables.
How can I do this? I'm using xfce4-terminal. It has a command-line arg "--command", to execute commands ...
0
votes
1
answer
107
views
Using cscope when making Linux kernel and cscope.files difference between "allnoconfig" and "defconfig" seems incorrect?
There seems to be very little difference between "allnoconfig" and "defconfig" when using diff to view the separate cscope.files for each build. Is this correct? Both files come ...
0
votes
1
answer
92
views
Differences between using source and ./ a .sh file
I know the above topic has been discussed before
source a .sh file and you retain the environmental variables after you are done with the sh file
while ./ a .sh file and you lose the environmental ...
15
votes
5
answers
5k
views
Why are there pre-compiled packages in repositories?
I love (the way) how Linux & Co. lets users install many packages from different repositories.
AFAIK, they come also with source-packages, so you can compile them by yourself.
But why even bother ...
0
votes
0
answers
74
views
How to patch source code tree from within the dir to be modified?
A source code tree contains a modified dnsmasq-2.80test4 source (and git files).
Now I'd like to apply the newest 2.86 dnsmasq source code to that modified 2.80test4 using diff and patch, while ...
0
votes
0
answers
175
views
Can I repost samsung kernel sources on my repo?
Samsung sources for Android are available at https://opensource.samsung.com but it's painful to download programatically. I believe that I'm free to do whatever I want with their kernel code including ...
10
votes
2
answers
2k
views
Source of passwd error messages
I am testing if the passwd command could run if the setuid bit is disabled. I disabled the setuid by running the following command:
chmod 0554 /bin/passwd
After doing so, I tested if the passwd ...
7
votes
2
answers
4k
views
How to source some shell code not a file?
There is a description of a source command:
source is a bash shell built-in command that executes the content of the file passed as argument, in the current shell. It has a synonym in . (period).
For ...
3
votes
1
answer
993
views
Cannot source file using find, fzf, and xargs
I am trying to use fzf to select and activate different virtual environments. However, I am receiving the follow error:
xargs: source: No such file or directory
My command comprises three parts: find |...
1
vote
3
answers
8k
views
How to view source code to built in linux commands? [duplicate]
To my knowledge, when I run a command like ping or grep or ls, the Linux OS will search for these command names in the directory /bin; I also know most Linux commands are written in C.
I just wanted ...
1
vote
1
answer
60
views
How to verify that source code does / does not provide driver for Apple USB modem?
Source Code: https://unix.stackexchange.com/a/698474/182280
The goal is to verify that the source code has the driver to support an Apple USB Faxmodem MA034Z/A. What are the keywords or phrases to ...
4
votes
4
answers
2k
views
Is it possible for a shell to (automatically) source files after the first prompt is shown?
I'm wondering if there is any way to put something in my startup files that will cause other files to be sourced after the first prompt is shown.
I would prefer a method that doesn't rely on hooks ...
0
votes
2
answers
303
views
Installing a linux software package from source
is it possible to install a package from source? For example whether debian or opensuse, would it be possible to install an existing package say nginx from source?
The reason is that i want to try ...
0
votes
1
answer
2k
views
How do I get a sourced file in zshrc to run in bash?
I have a bash script that includes a bunch of functions. I'd like this script to run using bash. The script has this at the top:
echo "BASH_VERSION""$BASH_VERSION"
echo "...
4
votes
1
answer
34k
views
Debian: The repository CDROM does not have a Release file
I have just finished installing Debian on my laptop; I had to add manually the drivers for my WiFi card after the installation, I simply installed them via sudo apt ./name.deb, where name.deb is a ....
2
votes
1
answer
517
views
Running "sudo -s" as a user with sudo priv, does not source .bashrc
I want to be able to run sudo -s as a user with sudo priv, and have /root/.bashrc be sourced.
I checked the .bashrc file and the .profile file for /root, both look fine.
Every time I try to use sudo -...
0
votes
1
answer
225
views
Calling a function from terminal without export from sources file [duplicate]
Have added a number of functions which I source from my .bashrc. For instance, I use
export -f calc
I also have another function usage_calc where I comment out the export call
# export -f usage_calc
...
7
votes
2
answers
4k
views
How can I get glibc/libstdc++ sources and set them up for gdb to find?
I'm debugging this program which raises an exception. This makes my debugger look for some source code, e.g. ../sysdeps/unix/sysv/linux/raise.c - and fail to find it.
Now, I realize it's not necessary ...