[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: lsb-release codename



peter green left as an exercise for the reader:
> I maintain a debian derivative called raspbian and got the following
> bug report.
> https://bugs.launchpad.net/raspbian/+bug/1069141
> How does lsb-release determine the codename? is it something to do
> with the repository? How should I fix this issue?

it gets it by reading /etc/lsb-release, which is owned by lsb-release.

https://www.sprezzatech.com/bugs/show_bug.cgi?id=544

[skynet](0) strace -f lsb-release -c
......
stat("/etc/lsb-release", {st_mode=S_IFREG|0644, st_size=115, ...}) = 0
open("/etc/lsb-release", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=115, ...}) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=115, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5cd7af8000
read(3, "DISTRIB_ID=SprezzOS\nDISTRIB_RELE"..., 8192) = 115
read(3, "", 4096)                       = 0
read(3, "", 8192)                       = 0
close(3)                                = 0
munmap(0x7f5cd7af8000, 4096)            = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 8), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5cd7af8000
write(1, "Codename:\tvon Neumann\n", 22Codename:	von Neumann
) = 22
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7f5cd770f310}, {0x425842, [], SA_RESTORER, 0x7f5cd770f310}, 8) = 0
exit_group(0)                           = ?
[skynet](0) $ 

-- 
nick black     http://www.sprezzatech.com -- unix and hpc consulting
to make an apple pie from scratch, you need first invent a universe.

Attachment: signature.asc
Description: Digital signature


Reply to: