debian/ 0000755 0000000 0000000 00000000000 11733271201 007163 5 ustar debian/docs 0000644 0000000 0000000 00000000007 11733271201 010033 0 ustar README
debian/pod2man.mk 0000644 0000000 0000000 00000003265 11733271201 011062 0 ustar # 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.manpages 0000644 0000000 0000000 00000000013 11733271201 013111 0 ustar debian/*.1
debian/clean 0000644 0000000 0000000 00000000051 11733271201 010164 0 ustar debian/*.1
wmshutdown-run
wmshutdown
*.o
debian/source/ 0000755 0000000 0000000 00000000000 11733271201 010463 5 ustar debian/source/format 0000644 0000000 0000000 00000000014 11733271201 011671 0 ustar 3.0 (quilt)
debian/changelog 0000644 0000000 0000000 00000012702 11733271201 011037 0 ustar 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.pod 0000644 0000000 0000000 00000002000 11733271201 012235 0 ustar # 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/copyright 0000644 0000000 0000000 00000002570 11733271201 011122 0 ustar 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/compat 0000644 0000000 0000000 00000000002 11733271201 010361 0 ustar 9
debian/menu 0000644 0000000 0000000 00000000200 11733271201 010042 0 ustar ?package(wmshutdown):needs="X11" section="Applications/System/Administration" title="wmshutdown" command="/usr/bin/wmshutdown"
debian/control 0000644 0000000 0000000 00000001256 11733271201 010572 0 ustar 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.Debian 0000644 0000000 0000000 00000000554 11733271201 011047 0 ustar 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.Debian 0000644 0000000 0000000 00000000344 11733271201 011225 0 ustar 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/rules 0000755 0000000 0000000 00000000652 11733271201 010246 0 ustar #!/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/watch 0000644 0000000 0000000 00000000237 11733271201 010216 0 ustar version=3
# [Version [Action]]
# 2009-11-28 No longer exists
http://www.rafaelaroca.hpg.ig.com.br/bin/ wmshutdown-(.+)\.tar\.gz
debian/dirs 0000644 0000000 0000000 00000000067 11733271201 010052 0 ustar usr/bin
usr/share
usr/share/pixmaps
usr/share/man/man1
debian/wmshutdown-run.1.pod 0000644 0000000 0000000 00000001745 11733271201 013056 0 ustar # 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/ 0000755 0000000 0000000 00000000000 11733271201 010612 5 ustar debian/patches/20-name-change=my.21-compile-fixes.patch 0000644 0000000 0000000 00000004375 11733271201 017654 0 ustar 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.patch 0000644 0000000 0000000 00000002520 11733271201 014214 0 ustar 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/series 0000644 0000000 0000000 00000000120 11733271201 012020 0 ustar 10-makefile.patch
20-name-change.patch
20-name-change=my.21-compile-fixes.patch
debian/patches/10-makefile.patch 0000644 0000000 0000000 00000004301 11733271201 013624 0 ustar 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