Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Makefiles not to create files in root dir when building packages #63

Closed
wants to merge 1 commit into from

Conversation

vchrizz
Copy link
Contributor

@vchrizz vchrizz commented Oct 26, 2018

When building debian packages, files get installed in root dir instead of build dir, thus permission denied error occurs on building process. Change to install files in build dir on building to fix this.

@vchrizz vchrizz changed the title Fix Makefiles not to create files in root dir Fix Makefiles not to create files in root dir when building packages Oct 26, 2018
@fhuberts
Copy link
Contributor

I think you should use DESTDIR

@vchrizz
Copy link
Contributor Author

vchrizz commented Oct 26, 2018

on building i get this error:

mkdir -p /etc/olsrd
mkdir: cannot create directory '/etc/olsrd': Permission denied
Makefile:168: recipe for target 'install_olsrd' failed
make[2]: *** [install_olsrd] Error 1
make[2]: Leaving directory '/build/olsrd-0.9.6.2'

so line 177 from Makefile is the first problem.
i tried building with export DESTDIR=${TOPDIR} and export DESTDIR=/build/ but this didnt help to fix the error.
(maybe see also: mika/jenkins-debian-glue#200 )

@pmelange
Copy link
Contributor

I had the same issue in #64. The changes to the Makefile worked, as far as making deb packages.

I have not tested doing make; make install. I assume @vchrizz has tested that.

@fhuberts
Copy link
Contributor

works perfectly for me:

$ make DESTDIR="$(pwd)/dist" build_all install_all
...

$ find dist/ -type f|sort
dist/etc/olsrd/olsrd.conf
dist/etc/olsrd/olsrd.pud.position.conf
dist/etc/olsrd/olsrd.sgw.speed.conf
dist/usr/local/lib/libnmea.so.3.0.0
dist/usr/local/lib/libOlsrdPudWireFormat.so.3.0.0
dist/usr/local/lib/olsrd_arprefresh.so.0.1
dist/usr/local/lib/olsrd_bmf.so.1.7.0
dist/usr/local/lib/olsrd_dot_draw.so.0.3
dist/usr/local/lib/olsrd_dyn_gw_plain.so.0.4
dist/usr/local/lib/olsrd_dyn_gw.so.0.5
dist/usr/local/lib/olsrd_httpinfo.so.0.1
dist/usr/local/lib/olsrd_jsoninfo.so.1.1
dist/usr/local/lib/olsrd_mdns.so.1.0.1
dist/usr/local/lib/olsrd_mini.so.0.1
dist/usr/local/lib/olsrd_nameservice.so.0.4
dist/usr/local/lib/olsrd_netjson.so.1.1
dist/usr/local/lib/olsrd_p2pd.so.0.1.0
dist/usr/local/lib/olsrd_pgraph.so.1.1
dist/usr/local/lib/olsrd_poprouting.so.1.0
dist/usr/local/lib/olsrd_pud.so.3.0.0
dist/usr/local/lib/olsrd_quagga.so.0.2.2
dist/usr/local/lib/olsrd_secure.so.0.6
dist/usr/local/lib/olsrd_sgwdynspeed.so.1.0.0
dist/usr/local/lib/olsrd_txtinfo.so.1.1
dist/usr/local/lib/olsrd_watchdog.so.0.1
dist/usr/local/sbin/olsrd
dist/usr/local/sbin/sgw_policy_routing_setup.sh
dist/usr/local/share/man/man5/olsrd.conf.5.gz
dist/usr/local/share/man/man8/olsrd.8.gz

@fhuberts fhuberts closed this Mar 20, 2019
@vchrizz
Copy link
Contributor Author

vchrizz commented Aug 23, 2021

Just for the record, since this issue is debian specific, I created a debian patch in my fork of the debian olsrd repository to fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants