Closed Ed-von-Schleck closed 9 years ago
That's funny. Can you check if you get these lines in your terminal:
...
make[1]: Entering directory `/home/dgunchev/rpmbuild/BUILD/zram-1.0.0'
install -d /home/dgunchev/rpmbuild/BUILDROOT/zram-1.0.0-0.fc16.x86_64/usr/sbin
install -m 0755 zramstart /home/dgunchev/rpmbuild/BUILDROOT/zram-1.0.0-0.fc16.x86_64/usr/sbin
install -m 0755 zramstop /home/dgunchev/rpmbuild/BUILDROOT/zram-1.0.0-0.fc16.x86_64/usr/sbin
install -m 0755 zramstat /home/dgunchev/rpmbuild/BUILDROOT/zram-1.0.0-0.fc16.x86_64/usr/sbin
install -d /home/dgunchev/rpmbuild/BUILDROOT/zram-1.0.0-0.fc16.x86_64/lib/systemd/system
install -m 0644 zram.service /home/dgunchev/rpmbuild/BUILDROOT/zram-1.0.0-0.fc16.x86_64/lib/systemd/system
install -d /home/dgunchev/rpmbuild/BUILDROOT/zram-1.0.0-0.fc16.x86_64/etc/sysconfig
install -m 0644 zram /home/dgunchev/rpmbuild/BUILDROOT/zram-1.0.0-0.fc16.x86_64/etc/sysconfig
make[1]: Leaving directory `/home/dgunchev/rpmbuild/BUILD/zram-1.0.0'
...
I also see this issue.
I just noticed that zram.service is placed in lib/systemd/system, and the spec says look in %{_unitdir}/zram.service. On fedora 18, /lib is a link to /usr/lib. I think the makefile gets a different view of this path than the rpm builder.
BTW - thanks for the scripts. zram is an often undervalued addition, and when used wisely, can improve things greatly, particularly for laptops that die when swapping begins.
Here's a fix to the zram.spec that makes it work on Fedora 18: make the /lib link like the rot fs has, and exclude /lib from files:
%install mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig mkdir -p $RPM_BUILD_ROOT%{_unitdir} ln -s $RPM_BUILD_ROOT/usr/lib $RPM_BUILD_ROOT/lib mkdir -p $RPM_BUILD_ROOT%{_sbindir} %makeinstall DESTDIR=$RPM_BUILD_ROOT ... %files %doc README.md %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %{_unitdir}/zram.service %{_sbindir}/zramstart %{_sbindir}/zramstop %{_sbindir}/zramstat %exclude /lib
10x for the solution. Unfortunately I'm stuck with fedora 16 and can not test it for now :(
mr700, any updating on mainlining this fix? Just ran it on Fedora 19 and it works there too (fails without the above edit)
Addendum to the above: Compiles fine but....
It looks like Fedora stopped shipping zRAM by default.
[egriffith@eric-laptop FedoraZram]$ sudo modprobe zram modprobe: FATAL: Module zram not found. [egriffith@eric-laptop FedoraZram]$
buuuuuuuuuuut...
[egriffith@eric-laptop FedoraZram]$ sudo locate zram /usr/src/kernels/3.10.7-200.fc19.x86_64/drivers/staging/zram /usr/src/kernels/3.10.7-200.fc19.x86_64/drivers/staging/zram/Kconfig /usr/src/kernels/3.10.7-200.fc19.x86_64/drivers/staging/zram/Makefile /usr/src/kernels/3.10.9-200.fc19.x86_64/drivers/staging/zram /usr/src/kernels/3.10.9-200.fc19.x86_64/drivers/staging/zram/Kconfig /usr/src/kernels/3.10.9-200.fc19.x86_64/drivers/staging/zram/Makefile [egriffith@eric-laptop FedoraZram]$
The zram module is in the staging, which you can get from rpmfusion (documented), see https://github.com/mr700/FedoraZram for some more improvements. I created a pull request.
Hey,
I tried building the rpm (after setting up the rpm-build environment) with 'make rpm' on Fedora 18 and got this
Which is German and translates to (though probably not verbatim):
Not sure what do do here. Any help appreciated. Thanks!