You are not logged in.

#1 2008-12-30 06:50:51

filam
Wiki Maintainer
From: Portland, ME
Registered: 2008-04-11
Posts: 158
Website

[SOLVED] dwm Recompile Difficulty

I am currently running dwm. I followed the abs intall method from the ArchWiki, but have run into trouble when I attempt to make changes to the config.h and recompile. If I make a single simple change to config.h (ex. change the value of "static const char ...color" or "static unsigned int borderpx") I do not notice any change in dwm upon restarting it.

[filam@lotte dwm]$ makepkg -efi
==> Making package: dwm 5.3-1 i686 (Tue Dec 30 11:47:02 EST 2008)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> WARNING: Skipping source retrieval        -- using existing src/ tree
==> WARNING: Skipping source integrity checks -- using existing src/ tree
==> WARNING: Skipping source extraction       -- using existing src/ tree
==> Removing existing pkg/ directory...
==> Entering fakeroot environment...
==> Starting build()...
dwm build options:
CFLAGS   = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/include/X11 -DVERSION="5.3" 
LDFLAGS  = -s -L/usr/lib -lc -L/usr/lib/X11 -lX11 
CC       = cc
CC dwm.c
CC -o dwm
dwm build options:
CFLAGS   = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/X11R6/include -DVERSION="5.3" 
LDFLAGS  = -s -L/usr/lib -lc -L/usr/X11R6/lib -lX11 
CC       = cc
installing executable file to /home/filam/dwm/pkg/usr/bin
installing manual page to /home/filam/dwm/pkg/usr/share/man/man1
==> Tidying install...
  -> Compressing man pages...
  -> Stripping debugging symbols from binaries and libraries...
==> Creating package...
  -> Generating .PKGINFO file...
  -> Adding install script...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: dwm 5.3-1 i686 (Tue Dec 30 11:47:04 EST 2008)
==> Installing package dwm with pacman -U...

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

Password: 
filam is not in the sudoers file.  This incident will be reported.

As a reletively new end-user I can imagine I have made some simple mistake, but just can't imagine what that might be.

Last edited by filam (2008-12-30 16:57:29)

Offline

#2 2008-12-30 06:59:05

lake
Member
From: St. Paul, MN
Registered: 2008-12-10
Posts: 11

Re: [SOLVED] dwm Recompile Difficulty

pacman needs root privis when it installs a package, run that command as root, or add your user account to /etc/sudoers

Offline

#3 2008-12-30 07:10:59

filam
Wiki Maintainer
From: Portland, ME
Registered: 2008-04-11
Posts: 158
Website

Re: [SOLVED] dwm Recompile Difficulty

==> ERROR: Running makepkg as root is a BAD idea and can cause
    permanent, catastrophic damage to your system. If you
    wish to run as root, please use the --asroot option.

What should I add to /etc/sudoers?

I imagine I don't want to do this:

filam ALL=(ALL) ALL

The sudoers man page looks rather long. I'll check in the morning (in 6 hours).

Last edited by filam (2008-12-30 07:12:23)

Offline

#4 2008-12-30 07:17:35

lake
Member
From: St. Paul, MN
Registered: 2008-12-10
Posts: 11

Re: [SOLVED] dwm Recompile Difficulty

filam ALL=(ALL) ALL is correct, but it does give you full root priviledges if you run sudo, so you're good to be cautious

I run sudo makepkg when installing ABS packages, after all it does need root priviledges to install stuff system wide, but I'll let others chime in if theres a better way smile

Offline

#5 2008-12-30 07:18:10

string
Member
Registered: 2008-11-03
Posts: 286

Re: [SOLVED] dwm Recompile Difficulty

You need root privs to install packages but you don't need them in order to create packages. You are running `makepkg -efi` which will try to install the package after its creation. The solution is simple, first create the package as a regular user via `makepkg -ef` (the `i` flag has been stripped), then, log in as root and run `pacman -U /full/path/to/your/newly/created/package`.

Last edited by string (2008-12-30 07:21:23)

Offline

#6 2008-12-30 07:20:25

SamC
Member
From: Calgary
Registered: 2008-05-13
Posts: 611
Website

Re: [SOLVED] dwm Recompile Difficulty

I've seen a lot of people who use dwm installed to their home directory, outside of pacman, as it is only one binary that can be placed in ~/bin. This cuts down on the reinstallation, for instance.

Offline

#7 2008-12-30 16:49:41

filam
Wiki Maintainer
From: Portland, ME
Registered: 2008-04-11
Posts: 158
Website

Re: [SOLVED] dwm Recompile Difficulty

Thanks for the help lake.

string wrote:

You need root privs to install packages but you don't need them in order to create packages. You are running `makepkg -efi` which will try to install the package after its creation. The solution is simple, first create the package as a regular user via `makepkg -ef` (the `i` flag has been stripped), then, log in as root and run `pacman -U /full/path/to/your/newly/created/package`.

Thanks string. Perfect explanation. This solution was exactly what I was looking for. Worked like a charm.

Offline

#8 2008-12-30 17:27:20

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: [SOLVED] dwm Recompile Difficulty

filam wrote:

I imagine I don't want to do this:

filam ALL=(ALL) ALL

The sudoers man page looks rather long. I'll check in the morning (in 6 hours).

You're right. You don't want to add that. Ever.

Last edited by moljac024 (2008-12-30 17:28:24)


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#9 2008-12-30 17:45:46

djnm
Member
From: USA
Registered: 2008-12-21
Posts: 78

Re: [SOLVED] dwm Recompile Difficulty

SamC wrote:

I've seen a lot of people who use dwm installed to their home directory, outside of pacman, as it is only one binary that can be placed in ~/bin. This cuts down on the reinstallation, for instance.

I would advise doing this.  I have dwm set up this way and it works nicely in terms of config.h control, installation, and upgrading.


br0tat0chip in #archlinux and on freenode

Offline

#10 2008-12-30 23:48:14

bogomipz
Member
From: Oslo, Norway
Registered: 2003-11-23
Posts: 169

Re: [SOLVED] dwm Recompile Difficulty

I too run dwm from ~/bin, certainly this is the way to go since the binary is personal - it contains your configuration.

BUT, when I do makepkg -i the package gets built as my normal user, and then the installation magically happens through sudo. I don't think I have anything special configured for this, other than having fakeroot installed.


All of your mips are belong to us!!

Offline

Board footer

Powered by FluxBB