Skip to content

Is 'root' really necessary? #7

@mcallaway

Description

@mcallaway

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions