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

Is 'root' really necessary? #7

Open
mcallaway opened this issue Feb 7, 2014 · 0 comments
Open

Is 'root' really necessary? #7

mcallaway opened this issue Feb 7, 2014 · 0 comments

Comments

@mcallaway
Copy link

You could leverage "fakeroot" to avoid needing root permissions:

  diff --git a/Makefile.in b/Makefile.in
  index 1caf7f1..4b20ff7 100644
  --- a/Makefile.in
  +++ b/Makefile.in
  @@ -60,16 +60,11 @@ uninstall:
          rmdir $(DESTDIR)$(datarootdir)/debra

   deb:
  -ifeq (root, $(shell whoami))
          bin/debra create debian control
          $(GIT) archive --prefix=debian/ HEAD | $(GZIP) >debian.tar.gz
          bin/debra sourceinstall debian debian.tar.gz -p /usr
          rm debian.tar.gz
  -       chown -R root:root debian
  -       bin/debra build debian debra_$(VERSION)_all.deb
  +       fakeroot bin/debra build debian debra_$(VERSION)_all.deb
          bin/debra destroy debian
  -else
  -       @echo "You must be root to build a Debian package."
  -endif

   .PHONY: all install uninstall man deb
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

No branches or pull requests

1 participant