Modify

#1162 closed defect (fixed)

Strange check for root breaks building RPM packages

Reported by: robert@… Owned by:
Priority: normal Milestone:
Component: BitlBee Version: 3.2.1
Keywords: patch Cc:
IRC client+version: Client-independent Operating System: Linux
OS version/distro: Fedora > 14, RHEL > 7

Description

The current check if somebody is root for "make install-systemd" breaks RPM packaging on e.g. Fedora. Instead I suggest this:

--- bitlbee-3.2.2/Makefile              2014-07-05 23:40:53.000000000 +0200
+++ bitlbee-3.2.2/Makefile.no-root      2014-07-06 15:50:18.000000000 +0200
@@ -148,14 +148,10 @@

 install-systemd:
 ifdef SYSTEMDSYSTEMUNITDIR
-ifeq ($(shell id -u),0)
        mkdir -p $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)
        $(INSTALL) -m 0644 init/bitlbee.service $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)
        $(INSTALL) -m 0644 init/bitlbee@.service $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)
        $(INSTALL) -m 0644 $(_SRCDIR_)init/bitlbee.socket $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)
-else
-       @echo Not root, so not installing systemd files.
-endif
 endif

 tar:

If that check for root is really needed, change it please to something like "if(uid == 0 or destdir != "")" to avoid breaking RPM packaging.

Attachments (0)

Change History (2)

comment:1 Changed at 2014-07-07T09:13:33Z by dx

Keywords: patch added

yep

comment:2 Changed at 2014-10-11T07:47:16Z by dx

Resolution: fixed
Status: newclosed

Modify Ticket

Action
as closed The ticket will remain with no owner.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.