Questions tagged [fakeroot]

The original version `fakeroot` uses `LD_PRELOAD` to coerce child processes that expect to run as superuser (root) into thinking they get to run as superuser. A rewrite based on `ptrace` exists, named `fakeroot-ng`.

Filter by
Sorted by
Tagged with
0
votes
0answers
16 views

How does makepkg pass variables and functions through fakeroot?

I am at a complete loss on how makepkg passes through variables and functions into the fakeroot environment. I've looked at makepkg and the line that seems to show how it's done makes no sense to me: ...
0
votes
2answers
31 views

Passing variables and functions through fakeroot

I want to use fakeroot for a project, but the project has lots of functions and variables that I need to pass through to fakeroot. #!/bin/bash myVar="foo" function testFunction() { echo ...
0
votes
1answer
130 views

How to temporarily leave fakeroot environment

To run some tests, I want to revoke write permissions for a folder. This is a minimal example: $ mkdir test $ chmod a-w test $ touch test/test || printf '%s\n' "write permissions successfully revoked"...
1
vote
1answer
71 views

Do file writes as in-memory fake on Linux [duplicate]

I'd like to run a Linux process in a fake-write environment where all file writes (with the write(2) system call) are redirected to an in-memory cache, and subsequent reads (of the same region only) ...
5
votes
2answers
1k views

Issue with changing permissions with fakeroot

I don't understand why the permission does not change for a user when I run the chmod command with fakeroot. Initially, the file has these permissions: -rwxr-xr-x a.txt* When I try to change the ...
0
votes
1answer
558 views

How do I make PKGBUILD to install to fake root before makepkg builds

I have a tree which I need to install with a foder named /usr. This folder exists in src folder. Now I need to write a function in PKGBUILD that installs to the fakeroot before the *.pkg.tar.gz is ...
0
votes
1answer
380 views

Permission problem with equivs-build

I am trying to install a vanilla texlive 2018 distribution on a ubuntu 16.04 machine following this guide: https://tex.stackexchange.com/questions/1092/how-to-install-vanilla-texlive-on-debian-or-...
18
votes
3answers
7k views

How fakeroot is not a security breach in Linux?

After reading some pretty nice answers from this question, I am still fuzzy on why you would want to pretend that you are root without getting any of the benefits of actually being root. So far, what ...
1
vote
0answers
106 views

Fakeroot on macOS tries to delete system directories

I’m having a problem with fakeroot on macOS. I created a pacman fork. When I’d like to delete a package, pacman tries to delete /usr/ instead of a subdirectory. On Linux, it is working fine, though. ...
1
vote
1answer
850 views

How to avoid running make as root in the last step of installing an application from source? [duplicate]

I am always reluctant to run make install as root as the last step of installing an application from source. After all, it allows executing arbitrary code form the Makefile. It has already happened to ...
2
votes
2answers
2k views

How to run old 32 bit linux software in a container inside a modern 64-bit distribution

I need to create a container to run an old proprietary software that used to work in my old 32 bit computer with Ubuntu 8.04. I have been adapting this software in successive OS upgrades by linking ...
3
votes
1answer
556 views

Within fakeroot, why does chown return EPERM even though it succeeds (but then again it didn't)?

I've been running into bizarre behavior when using chown(2) within a fakeroot environment. The following minimal program illustrates the issue: #include <fcntl.h> #include <stdio.h> #...
4
votes
2answers
1k views

fakeroot cdebootstrap: Failed to unshare: Operation not permitted [duplicate]

On Debian, when running: $ fakeroot cdebootstrap stable /tmp/foo cdebootstrap downloads the packages, but when it has to extract them, I get this error: E: Failed to unshare: Operation not ...
9
votes
3answers
7k views

Is it possible to run debootstrap within a fakeroot environment?

I have a script that prepares an installation image by running debootstrap, does some modifications on the files and then copies the files to a disk image backed up by a file. This works under root, ...
0
votes
1answer
367 views

fakeroot make-kpkg buildpackage

When I run make-kpkg --initrd buildpackage with concurrency_level set to 17, all cores are at 100% according to gnome-system-monitor, when running the cc1-jobs. When I run fakeroot make-kpkg --...
3
votes
1answer
2k views

dh_install: libnanomsg-dev missing files (usr/lib/*/lib*.a), aborting

I'm trying to backport libnanomsg-dev from jessie to squeeze and following this tutorial. Here's what I get: $ fakeroot debian/rules binary ... dh_testroot -O--parallel dh_prep -O--parallel ...
1
vote
0answers
689 views

fakeroot-ng with debootstrap variant fakechroot hangs on makedev

So I am trying to bootstrap a Ubuntu as unprivileged user on Ubuntu. The little script I am using is: #!/usr/bin/env bash DEBARCHIVE_URL="http://localhost:3142/de.archive.ubuntu.com/ubuntu/" LANG=...