Group :: System/Libraries
RPM: libnoch
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Name: libnoch
Version: 0.4.1
Release: alt1
Summary: Stab wrappers for chmod and chown calls
License: GPL
Group: System/Libraries
Source0: noch.c
Source1: chtest.c
%description
Stab wrappers for *chmod and *chown calls.
%prep
%setup -qcT
install -pm644 %SOURCE0 %SOURCE1 .
%build
readelf -Ws /%_lib/libc.so.6 | awk '
$4 == "FUNC" && $6 == "DEFAULT" && $8 ~ / at at / {
sym=$8;
name=gensub(" at at .*", "", 1, sym);
vers=gensub("^[^ at ]* at at ", "", 1, sym);
printf("#define %%s_vers \"%%s\"\n", name, vers);
}' >vers.h
gcc %optflags %optflags_shared noch.c -ldl -shared -o libnoch.so
gcc %optflags chtest.c -o chtest
LD_PRELOAD=./libnoch.so ./chtest
%install
install -pDm755 libnoch.so %buildroot%_libdir/libnoch.so
%files
%_libdir/libnoch.so
%changelog
…
Full changelog you can see here
Version: 0.4.1
Release: alt1
Summary: Stab wrappers for chmod and chown calls
License: GPL
Group: System/Libraries
Source0: noch.c
Source1: chtest.c
%description
Stab wrappers for *chmod and *chown calls.
%prep
%setup -qcT
install -pm644 %SOURCE0 %SOURCE1 .
%build
readelf -Ws /%_lib/libc.so.6 | awk '
$4 == "FUNC" && $6 == "DEFAULT" && $8 ~ / at at / {
sym=$8;
name=gensub(" at at .*", "", 1, sym);
vers=gensub("^[^ at ]* at at ", "", 1, sym);
printf("#define %%s_vers \"%%s\"\n", name, vers);
}' >vers.h
gcc %optflags %optflags_shared noch.c -ldl -shared -o libnoch.so
gcc %optflags chtest.c -o chtest
LD_PRELOAD=./libnoch.so ./chtest
%install
install -pDm755 libnoch.so %buildroot%_libdir/libnoch.so
%files
%_libdir/libnoch.so
%changelog
…
Full changelog you can see here