debian/0000755000000000000000000000000011733271201007163 5ustar debian/docs0000644000000000000000000000000711733271201010033 0ustar README debian/pod2man.mk0000644000000000000000000000326511733271201011062 0ustar # pod2man.mk -- Makefile portion to convert *.pod files to manual pages # # Copyright information # # Copyright (C) 2008-2009 Jari Aalto # # License # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Description # # Convert *.pod files to manual pages. Write this to 'install' # target: # # install: build $(MANPAGE) ifneq (,) This makefile requires GNU Make. endif # This variable *must* be set when calling PACKAGE ?= package # Optional variables to set MANSECT ?= 1 PODCENTER ?= $$(date "+%Y-%m-%d") # Directories MANSRC = MANDEST = $(MANSRC) MANPOD = $(MANSRC)$(PACKAGE).$(MANSECT).pod MANPAGE = $(MANDEST)$(PACKAGE).$(MANSECT) POD2MAN = pod2man POD2MAN_FLAGS = --utf8 makeman: $(MANPAGE) $(MANPAGE): $(MANPOD) # make target - create manual page from a *.pod page podchecker $(MANPOD) LC_ALL= LANG=C $(POD2MAN) $(POD2MAN_FLAGS) \ --center="$(PODCENTER)" \ --name="$(PACKAGE)" \ --section="$(MANSECT)" \ $(MANPOD) \ | sed 's,[Pp]erl v[0-9.]\+,$(PACKAGE),' \ > $(MANPAGE) && \ rm -f pod*.tmp # End of of Makefile part debian/wmshutdown.manpages0000644000000000000000000000001311733271201013111 0ustar debian/*.1 debian/clean0000644000000000000000000000005111733271201010164 0ustar debian/*.1 wmshutdown-run wmshutdown *.o debian/source/0000755000000000000000000000000011733271201010463 5ustar debian/source/format0000644000000000000000000000001411733271201011671 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000001270211733271201011037 0ustar wmshutdown (0.2-9) unstable; urgency=low * debian/copyright - Update to format 1.0 -- Jari Aalto Sat, 24 Mar 2012 02:47:56 -0400 wmshutdown (0.2-8) unstable; urgency=low * debian/rules - Enable all hardening flags with DEB_BUILD_MAINT_OPTIONS and reading Debian specific CPPFLAGS. -- Jari Aalto Tue, 06 Mar 2012 10:55:18 -0500 wmshutdown (0.2-7) unstable; urgency=low * debian/control - Build-Depends: rm dpkg-dev; buildflags.mk no longer used. - (Standards-Version): Update to 3.9.3 * debian/patches - (10): Adjust patch to actually use LDFLAGS and CFLAGS to enable hardened CFLAGS. Patch thanks to Simon Ruderich (Closes: #662010). * debian/rules - Remove buildflags.mk which is unnecessary with compat 9. Change to DEB_*_MAINT_APPEND variables. Both changes thanks to Simon Ruderich . -- Jari Aalto Sun, 04 Mar 2012 12:00:34 -0500 wmshutdown (0.2-6) unstable; urgency=low * debian/compat - Update to 9 * debian/control - (Build-Depends): update to debhelper 9, dpkg-dev 1.16.1. * debian/copyright - Update to DEP5. * debian/rules - Remove unused targets. - Use hardened CFLAGS. http://wiki.debian.org/ReleaseGoals/SecurityHardeningBuildFlags -- Jari Aalto Wed, 15 Feb 2012 08:16:19 -0500 wmshutdown (0.2-5) unstable; urgency=low * Move to format: 3.0 (quilt). * debian/{clean,manpages} - Move content from debian/rules for dh(1). * debian/control (Build-Depends): Remove dpatch. * debian/copyright - Minor layout adjustment. Use FSF URL. * debian/debian-vars.mk - Delete, obsoleted by dh(1). * debian/patches - Convert to quilt. - (10): Adjust link flags and add trimmed down GTKLIBS. - (30): New patch to fix "cast to pointer from integer of different size" warnings. * debian/README.source - Delete, obsoleted by format 3.0. * debian/rules - Remove rules obsoleted by dh(1). -- Jari Aalto Thu, 17 Dec 2009 14:21:08 +0200 wmshutdown (0.2-4) unstable; urgency=medium * New maintainer (ITA; Closes: #352440). - ACK and integrate previous QA changes * debian/README.Debian - Document change of binary name: wmshutdown, wmshutdown-run * debian/README.Debian - Instruct how to disable shutdown-run(1) from other users than root. * debian/compat - New file. * debian/control - (Description): Improve paragraphs. - (Depends): Added dpatch, - (Homepage, Vcs-*): New fields. - (Standards-Version): Update to 3.8.3 * debian/copyright - Update to newest dh-make template. - Update upstream author's email and URL address. * debian/menu - Update section according to latest policy. * debian/docs - Remove file. * debian/pod2man.mk - New file. * debian/rules - Add dpatch and manual page creation. - (clean): use dh_prep (lintian). * debian/patches/10-makefile.dpatch - Nef file - (LDFLAGS): new variable. Check problems with linker flag -Wl,--no-add-needed See http://wiki.debian.org/qa.debian.org/FTBFS#A2009-11-02Packagesfailingbecausebinutils-gold.2BAC8-indirectlinking - (LIBS): new variable. Use -lX11. - (all): change to call build targets. - (dock): Link against LIBS (FTBFS; Closes: #556683). - (help): move echo commands here. - (install): Change program names to reflect package: wmShutdown => wmshutdown. Shutdown => wmshutdown-run. * debian/patches/10-name-change.dpatch - Change program names and use FHS directories. * debian/watch - New file. * Other: - Remove old *.1 manual pages and write new ones in *.pod format. -- Jari Aalto Tue, 08 Dec 2009 13:58:06 +0200 wmshutdown (0.2-3) unstable; urgency=low * QA upload. * Change build-dep to libgtk2.0-dev. + Makefile: use pkg-config instead of gtk-config. -- Barry deFreese Thu, 19 Feb 2009 12:59:24 -0500 wmshutdown (0.2-2) unstable; urgency=low * QA upload. * debian/control - set maintainer to QA group - bump Standards-Version to 3.8.0 (no changes needed) - bump versioned build-dep on debhelper to at least 5 - small reformat of short and long descriptions - added ${misc:Depends} to Depends * debian/compat - created with value set to 5 * debian/rules - removed configure target, not needed - removed DH_COMPAT - moved compilation into build (from install), where it belong - merged 'rm' into 'dh_clean' call - don't ignore "make clean" errors - removed unneeded and commented dh_* calls * debian/copyright - fixed copyright section - indented copyright, upstream author and license section with 4 spaces * debian/menu - updated section to Applications/System/Administration * debian/{Shutdown.1,wmShutdown.1} - fixed the 'whatis' section -- Sandro Tosi Mon, 08 Dec 2008 13:02:21 +0100 wmshutdown (0.2-1) unstable; urgency=low * New upstream release * Closes: #205604: Error in file /usr/lib/menu/wmshutdown * Change maintainer e-mail address * Pseudo manpages has been written * Closes: #252718: New upstream release available (0.2) -- Rafal Zawadzki Sat, 5 Jun 2004 00:09:49 +0200 wmshutdown (0.1-1) unstable; urgency=low * Initial Release. -- Rafal Zawadzki Tue, 23 Jul 2002 21:34:11 +0200 debian/wmshutdown.1.pod0000644000000000000000000000200011733271201012235 0ustar # This is manual page in Perl POD format. Read more at # http://perldoc.perl.org/perlpod.html or run command: # # perldoc perlpod | less # # To check the syntax: # # podchecker *.pod # # Create manual page with command: # # pod2man PAGE.N.pod > PAGE.N =pod =head1 NAME wmshutdown - A graphical dock application to shutdown computer =head1 SYNOPSIS wmshutdown =head1 DESCRIPTION Wmshutdown is a dock application (for window manager) that can shutdown or reboot the workstation by clickig a button on the desktop. It effectively calls C via a helper command wmshutdown-run(1). =head1 OPTIONS None. =head1 ENVIRONMENT None. =head1 FILES None. =head1 SEE ALSO wmshutdown-run(1) =head1 AUTHORS This manual page was written by Jari Aalto , for the Debian GNU system (but may be used by others). Released under license GNU GPL v2 or (at your option) any later version. For more information about license, visit . =cut debian/copyright0000644000000000000000000000257011733271201011122 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0 Upstream-Name: Upstream-Contact: Rafael Vidal Aroca Source: None X-Upstream-Comment: Dead upstream. 2009-11-28 Sources no longer at . Files: * Copyright: 2002-2007 Rafael Vidal Aroca , , , , License: GPL-2+ Files: debian/* Copyright: 2007-2012 Jari Aalto 2002 Rafal Zawadzki License: GPL-2+ License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License can be found in "/usr/share/common-licenses/GPL-2". debian/compat0000644000000000000000000000000211733271201010361 0ustar 9 debian/menu0000644000000000000000000000020011733271201010042 0ustar ?package(wmshutdown):needs="X11" section="Applications/System/Administration" title="wmshutdown" command="/usr/bin/wmshutdown" debian/control0000644000000000000000000000125611733271201010572 0ustar Source: wmshutdown Section: x11 Priority: optional Maintainer: Jari Aalto Build-Depends: debhelper (>= 9), libgtk2.0-dev Standards-Version: 3.9.3.1 Vcs-Git: http://git.debian.org/collab-maint/wmshutdown.git Vcs-Browser: http://git.debian.org/?p=collab-maint/wmshutdown.git;a=summary Homepage: http://www.rafaelaroca.hpg.ig.com.br/bin Package: wmshutdown Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: dockapp to shutdown or reboot your machine This is a dock applications for Window Maker that allows you to shutdown or reboot your machine just by clickig a button on desktop and confirming. It's useful just for desktop machines. debian/NEWS.Debian0000644000000000000000000000055411733271201011047 0ustar NEWS for wmshutdown ------------------- Version 0.2-2 introduces changes that affect scripts that may have been written to take use of the binaries in this package. The new binaries are wmShutdown => wmshutdown Shutdown => wmshutdown-run Likewise for the manual pages. -- Jari Aalto Sat, 05 Dec 2009 14:32:16 +0200 debian/README.Debian0000644000000000000000000000034411733271201011225 0ustar wmshutdown for Debian --------------------- To allow other users than root to shutdown workstation, set suid flag: chmod ug+s /usr/bin/wmshutdown-run -- Jari Aalto , Tue, 8 Dec 2009 13:56:15 +0200 debian/rules0000755000000000000000000000065211733271201010246 0ustar #!/usr/bin/make -f PACKAGE = wmshutdown PACKAGE2 = wmshutdown-run export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed man: $(MAKE) -C debian -f pod2man.mk PACKAGE=$(PACKAGE) makeman $(MAKE) -C debian -f pod2man.mk PACKAGE=$(PACKAGE2) makeman override_dh_auto_build: man dh_auto_build %: dh $@ .PHONY: man # End of file debian/watch0000644000000000000000000000023711733271201010216 0ustar version=3 # [Version [Action]] # 2009-11-28 No longer exists http://www.rafaelaroca.hpg.ig.com.br/bin/ wmshutdown-(.+)\.tar\.gz debian/dirs0000644000000000000000000000006711733271201010052 0ustar usr/bin usr/share usr/share/pixmaps usr/share/man/man1 debian/wmshutdown-run.1.pod0000644000000000000000000000174511733271201013056 0ustar # This is manual page in Perl POD format. Read more at # http://perldoc.perl.org/perlpod.html or run command: # # perldoc perlpod | less # # To check the syntax: # # podchecker *.pod # # Create manual page with command: # # pod2man PAGE.N.pod > PAGE.N =pod =head1 NAME wmshutdown - suid program called by wmshutdown(1) to call /sbin/shutdown =head1 SYNOPSIS wmshutdown-run =head1 DESCRIPTION Wmshutdown-run is helper program for graphical dock application wmshutdown(1) that allows user to shutdown or reboot the workstation just by clickig a button on the desktop. =head1 OPTIONS None. =head1 ENVIRONMENT None. =head1 FILES None. =head1 SEE ALSO wmshutdown-run(1) =head1 AUTHORS This manual page was written by Jari Aalto , for the Debian GNU system (but may be used by others). Released under license GNU GPL v2 or (at your option) any later version. For more information about license, visit . =cut debian/patches/0000755000000000000000000000000011733271201010612 5ustar debian/patches/20-name-change=my.21-compile-fixes.patch0000644000000000000000000000437511733271201017654 0ustar From b82ed2871a01bd1842f11ef64773e07c7a1f41f9 Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Thu, 17 Dec 2009 12:30:57 +0200 Subject: [PATCH] Fix cast to pointer from integer warnings Signed-off-by: Jari Aalto --- shutdown.c | 20 ++++++++++---------- wmShutdown.c | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/shutdown.c b/shutdown.c index 857c410..91aec34 100644 --- a/shutdown.c +++ b/shutdown.c @@ -14,29 +14,29 @@ int main(int argc, char **argv) { if (argv[1] != NULL) { if (strcmp((char*)argv[1], "-r") == 0) { - char *teste; + int ch; FILE *output; printf("Rebooting...\n"); output = popen("/sbin/shutdown now -r", "r"); - teste = (char*) fgetc(output); - while ((int)teste != EOF) { - printf("%c", teste); - teste = (char*) fgetc(output); + ch = fgetc(output); + while (ch != EOF) { + printf("%c", ch); + ch = fgetc(output); } pclose(output); } if (strcmp(argv[1], "-h") == 0) { - char *teste; + int ch; FILE *output; printf("Halting...\n"); output = popen("/sbin/shutdown now -h", "r"); - teste = (char*) fgetc(output); - while ((int)teste != EOF) { - printf("%c", teste); - teste = (char*) fgetc(output); + ch = fgetc(output); + while (ch != EOF) { + printf("%c", ch); + ch = fgetc(output); } pclose(output); } diff --git a/wmShutdown.c b/wmShutdown.c index f03f4b9..a019025 100644 --- a/wmShutdown.c +++ b/wmShutdown.c @@ -55,26 +55,26 @@ int fecha(void) { int desliga(void) { FILE *output; - char *teste; + int ch; output = popen("/usr/bin/wmshutdown -h", "r"); - teste = (char*) fgetc(output); - while ((int)teste != EOF) { - g_print("%c", teste); - teste = (char*) fgetc(output); + ch = fgetc(output); + while (ch != EOF) { + g_print("%c", ch); + ch = fgetc(output); } pclose(output); } int reinicia(void) { FILE *output; - char *teste; + int ch; output = popen("/usr/bin/wmshutdown-run -r", "r"); - teste = (char*) fgetc(output); - while ((int)teste != EOF) { - g_print("%c", teste); - teste = (char*) fgetc(output); + ch = fgetc(output); + while (ch != EOF) { + g_print("%c", ch); + ch = fgetc(output); } pclose(output); } -- 1.6.5 debian/patches/20-name-change.patch0000644000000000000000000000252011733271201014214 0ustar From 0eda3e6215b8b2fa09fe032861313d08a98bb490 Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Tue, 8 Dec 2009 14:27:05 +0200 Subject: [PATCH] wmShutdown.c: change names Signed-off-by: Jari Aalto --- wmShutdown.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wmShutdown.c b/wmShutdown.c index 7f7e14e..f03f4b9 100644 --- a/wmShutdown.c +++ b/wmShutdown.c @@ -57,7 +57,7 @@ int desliga(void) { FILE *output; char *teste; - output = popen("/usr/local/bin/Shutdown -h", "r"); + output = popen("/usr/bin/wmshutdown -h", "r"); teste = (char*) fgetc(output); while ((int)teste != EOF) { g_print("%c", teste); @@ -70,7 +70,7 @@ int reinicia(void) { FILE *output; char *teste; - output = popen("/usr/local/bin/Shutdown -r", "r"); + output = popen("/usr/bin/wmshutdown-run -r", "r"); teste = (char*) fgetc(output); while ((int)teste != EOF) { g_print("%c", teste); @@ -148,7 +148,7 @@ int main(int argc, char *argv[]) { gtk_widget_realize(dockArea); icon = (gpointer) gdk_pixmap_create_from_xpm (gtkiw->window, &mask, - NULL, "/usr/share/pixmaps/wmShutdown.xpm"); + NULL, "/usr/share/pixmaps/wmshutdown.xpm"); pixmap = gtk_pixmap_new((gpointer) icon, mask); gtk_widget_show(pixmap); -- 1.6.5 debian/patches/series0000644000000000000000000000012011733271201012020 0ustar 10-makefile.patch 20-name-change.patch 20-name-change=my.21-compile-fixes.patch debian/patches/10-makefile.patch0000644000000000000000000000430111733271201013624 0ustar From 6770107f24a14e944cd1c9c097db416f58431036 Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Thu, 17 Dec 2009 14:20:10 +0200 Subject: [PATCH] Makefile: Change name. Fix linking with GTK+ Also use CFLAGS, CPPFLAGS, LDFLAGS from the environment. Necessary to use (hardening) compiler flags specified by dh. Signed-off-by: Jari Aalto --- Makefile | 32 ++++++++++++++++++++------------ 1 files changed, 20 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 219e871..678fda4 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,15 @@ -all: + +LDFLAGS += -Wl,--no-add-needed -Wl,--no-undefined +INCFLAGS = -I/usr/include/gtk-2.0 +LIBS = -lX11 + +# The listing "pkg-config --libs gtk+-2.0" can be trimmed down to needed libs +GTKLIBS = $(shell perl -e' print join qq( ), grep /(-x11|gobject|glib)/, @ARGV' -- $$(pkg-config --libs gtk+-2.0) ) +GTKFLAGS = `pkg-config --cflags gtk+-2.0` + +all: dock shutdown + +help: @echo "wmShutdown version 0.1 - Rafael V. Aroca " @echo "Order of makes to install: dock, shutdown, install" @@ -8,22 +19,19 @@ clean: rm -f Shutdown install: - install wmShutdown /usr/local/bin - install wmShutdown.xpm /usr/share/pixmaps/ - install -g root -o root Shutdown /usr/local/bin - chmod +s /sbin/shutdown - chmod +s /usr/local/bin/Shutdown - @echo Installed. Just type wmShutdown to use it + install -m 755 wmShutdown $(DESTDIR)/usr/bin/wmshutdown + install -m 644 wmShutdown.xpm $(DESTDIR)/usr/share/pixmaps/wmshutdown.xpm + install -m 755 Shutdown $(DESTDIR)/usr/bin/wmshutdown-run uninstall: - rm -f /usr/local/bin/wmShutdown - rm -f /usr/local/bin/Shutdown + rm -f /bin/wmShutdown + rm -f /bin/Shutdown rm -f /usr/share/pixmaps/wmShutdown.xpm @echo ":-( Uninstalled." dock: wmShutdown.c - $(CC) -c -o wmShutdown.o wmShutdown.c `gtk-config --cflags` - $(CC) -o wmShutdown wmShutdown.o `gtk-config --libs` + $(CC) $(CFLAGS) $(CPPFLAGS) $(INCFLAGS) $(GTKFLAGS) -c -o wmShutdown.o wmShutdown.c + $(CC) $(LDFLAGS) -o wmShutdown wmShutdown.o $(GTKLIBS) $(LIBS) shutdown: shutdown.c - $(CC) -o Shutdown shutdown.c + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(INCFLAGS) -o Shutdown shutdown.c -- 1.6.5