diff -Nru gkrellweather-2.0.8/debian/changelog gkrellweather-2.0.8/debian/changelog --- gkrellweather-2.0.8/debian/changelog 2016-12-01 07:34:17.000000000 +0000 +++ gkrellweather-2.0.8/debian/changelog 2016-11-30 17:19:51.000000000 +0000 @@ -1,3 +1,17 @@ +gkrellweather (2.0.8-2.1) unstable; urgency=medium + + * Non-maintainer upload. + * Switch to debhelper compat level 10 (Closes: #817479). + * Switch to dh(1). + * Don't strip the binary. + * Fix the data source URL, patch from Roland Hieber (Closes: #836347). + * Switch to 3.0 (quilt) format. + * Enable -Wl,--as-needed. + * Enable all hardening options. + * Drop debian/substvars from the package. + + -- Andrey Rahmatullin Wed, 30 Nov 2016 22:19:51 +0500 + gkrellweather (2.0.8-2) unstable; urgency=low * Updated download location in copyright file diff -Nru gkrellweather-2.0.8/debian/compat gkrellweather-2.0.8/debian/compat --- gkrellweather-2.0.8/debian/compat 2016-12-01 07:34:17.000000000 +0000 +++ gkrellweather-2.0.8/debian/compat 2016-11-30 17:19:51.000000000 +0000 @@ -1 +1 @@ -4 +10 diff -Nru gkrellweather-2.0.8/debian/control gkrellweather-2.0.8/debian/control --- gkrellweather-2.0.8/debian/control 2016-12-01 07:34:17.000000000 +0000 +++ gkrellweather-2.0.8/debian/control 2016-11-30 17:19:51.000000000 +0000 @@ -1,7 +1,7 @@ Source: gkrellweather Section: x11 Priority: optional -Build-Depends: debhelper (>= 4), gkrellm (>= 2.1.4), libglib2.0-dev, libgtk2.0-dev +Build-Depends: debhelper (>= 10), gkrellm (>= 2.1.4), libglib2.0-dev, libgtk2.0-dev Maintainer: Norbert Veber Standards-Version: 3.8.0 diff -Nru gkrellweather-2.0.8/debian/patches/build-flags.patch gkrellweather-2.0.8/debian/patches/build-flags.patch --- gkrellweather-2.0.8/debian/patches/build-flags.patch 1970-01-01 00:00:00.000000000 +0000 +++ gkrellweather-2.0.8/debian/patches/build-flags.patch 2016-11-30 17:19:51.000000000 +0000 @@ -0,0 +1,26 @@ +Description: Honor CFLAGS and LDFLAGS envvars. +Author: Andrey Rahmatullin +Last-Update: 2016-11-30 + +--- gkrellweather-2.0.8.orig/Makefile ++++ gkrellweather-2.0.8/Makefile +@@ -1,8 +1,8 @@ + PKGNAME = gkrellweather + VERSION = 2.0.8 +-CFLAGS = -O2 -std=gnu99 -Wall -fPIC `pkg-config gtk+-2.0 --cflags` ++CFLAGS += -O2 -std=gnu99 -Wall -fPIC `pkg-config gtk+-2.0 --cflags` + LIBS = `pkg-config gtk+-2.0 --libs` +-LFLAGS = -shared ++LDFLAGS += -shared + PREFIX = /usr/local + + LOCALEDIR := $(PREFIX)/share/locale +@@ -20,7 +20,7 @@ OBJS = gkrellweather.o + + gkrellweather.so: $(OBJS) + (cd po && ${MAKE} all ) +- $(CC) $(OBJS) -DVERSION=\"$(VERSION)\" -o gkrellweather.so $(LFLAGS) $(LIBS) -lpthread ++ $(CC) $(LDFLAGS) $(OBJS) -DVERSION=\"$(VERSION)\" -o gkrellweather.so $(LIBS) -lpthread + + clean: + (cd po && ${MAKE} clean ) diff -Nru gkrellweather-2.0.8/debian/patches/debian-changes.patch gkrellweather-2.0.8/debian/patches/debian-changes.patch --- gkrellweather-2.0.8/debian/patches/debian-changes.patch 1970-01-01 00:00:00.000000000 +0000 +++ gkrellweather-2.0.8/debian/patches/debian-changes.patch 2016-11-30 17:19:51.000000000 +0000 @@ -0,0 +1,54 @@ +--- gkrellweather-2.0.8.orig/GrabWeather ++++ gkrellweather-2.0.8/GrabWeather +@@ -40,12 +40,13 @@ + # Is LWP installed? + eval { require LWP::UserAgent }; + if ($@) { +- my $cmd = qq{wget --proxy=off --passive-ftp --tries=0 --quiet } . ++ my $cmd = qq{wget --cache=off --passive-ftp --tries=0 --quiet } . + qq{--output-document=$home/$ReportDir/$HTMLFileName $URL}; + `$cmd` == 0 or die "unable to fetch weather: $?"; + } else { + $ENV{FTP_PASSIVE} = 1; # LWP uses Net::FTP internally. + my $ua = new LWP::UserAgent; ++ $ua->env_proxy(); + my $req = new HTTP::Request( GET => $URL ); + my $rsp = $ua->request( $req ); + die $rsp->status_line unless $rsp->is_success; +--- gkrellweather-2.0.8.orig/Makefile ++++ gkrellweather-2.0.8/Makefile +@@ -32,11 +32,11 @@ + install: + (cd po && ${MAKE} install ) + if [ -d /usr/lib/gkrellm2/plugins/ ] ; then \ +- install -c -s -m 644 gkrellweather.so /usr/lib/gkrellm2/plugins/ ; \ ++ install -c -m 644 gkrellweather.so /usr/lib/gkrellm2/plugins/ ; \ + elif [ -d $(PREFIX)/lib/gkrellm2/plugins/ ] ; then \ +- install -c -s -m 644 gkrellweather.so $(PREFIX)/lib/gkrellm2/plugins/ ; \ ++ install -c -m 644 gkrellweather.so $(PREFIX)/lib/gkrellm2/plugins/ ; \ + else \ +- install -D -c -s -m 644 gkrellweather.so $(PREFIX)/lib/gkrellm2/plugins/gkrellweather.so ; \ ++ install -D -c -m 644 gkrellweather.so $(PREFIX)/lib/gkrellm2/plugins/gkrellweather.so ; \ + fi + install -c -m 755 GrabWeather $(PREFIX)/bin + +--- gkrellweather-2.0.8.orig/gkrellweather.c ++++ gkrellweather-2.0.8/gkrellweather.c +@@ -721,7 +721,7 @@ + options.station[1] = c[1]; + options.station[2] = c[2]; + options.station[3] = c[3]; +- snprintf(options.command, 512, PREFIX "/bin/GrabWeather %s", options.station); ++ snprintf(options.command, 512, PREFIX "/share/gkrellm/GrabWeather %s", options.station); + options.command[511] = 0; + snprintf(options.filename, 512, "%s/.wmWeatherReports/%s.dat", + getenv("HOME"), options.station); +@@ -986,7 +986,7 @@ + options.windspeed_unit = 1; + options.pressure_unit = 1; + strcpy(options.station, DEFAULT_STATION_ID); +- snprintf(options.command, 512, "/usr/share/gkrellm/GrabWeather %s", options.station); ++ snprintf(options.command, 512, PREFIX "/share/gkrellm/GrabWeather %s", options.station); + options.command[511] = 0; + snprintf(options.filename, 512, "%s/.wmWeatherReports/%s.dat", + getenv("HOME"), options.station); diff -Nru gkrellweather-2.0.8/debian/patches/fix-weather-url.patch gkrellweather-2.0.8/debian/patches/fix-weather-url.patch --- gkrellweather-2.0.8/debian/patches/fix-weather-url.patch 1970-01-01 00:00:00.000000000 +0000 +++ gkrellweather-2.0.8/debian/patches/fix-weather-url.patch 2016-11-30 17:19:51.000000000 +0000 @@ -0,0 +1,19 @@ +Description: weather.noaa.gov has been shut down +Author: Roland Hieber +Bug-Debian: https://bugs.debian.org/836347 +Last-Update: 2016-11-30 + +Index: gkrellweather-2.0.8/GrabWeather +=================================================================== +--- gkrellweather-2.0.8.orig/GrabWeather ++++ gkrellweather-2.0.8/GrabWeather +@@ -11,8 +11,7 @@ + # + + $ReportDir = '.wmWeatherReports'; +-#$WeatherSrc = 'ftp://weather.noaa.gov/data/observations/metar/decoded'; +-$WeatherSrc = 'http://weather.noaa.gov/pub/data/observations/metar/decoded'; ++$WeatherSrc = 'http://tgftp.nws.noaa.gov/data/observations/metar/decoded'; + + use strict; + use vars qw( $ReportDir $WeatherSrc ); diff -Nru gkrellweather-2.0.8/debian/patches/series gkrellweather-2.0.8/debian/patches/series --- gkrellweather-2.0.8/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ gkrellweather-2.0.8/debian/patches/series 2016-11-30 17:19:51.000000000 +0000 @@ -0,0 +1,3 @@ +debian-changes.patch +fix-weather-url.patch +build-flags.patch diff -Nru gkrellweather-2.0.8/debian/rules gkrellweather-2.0.8/debian/rules --- gkrellweather-2.0.8/debian/rules 2016-12-01 07:34:17.000000000 +0000 +++ gkrellweather-2.0.8/debian/rules 2016-11-30 17:19:51.000000000 +0000 @@ -1,67 +1,10 @@ #!/usr/bin/make -f -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed +export DEB_BUILD_MAINT_OPTIONS=hardening=+all +%: + dh $@ -build: build-stamp -build-stamp: - dh_testdir - - $(MAKE) PREFIX=/usr - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp - - # Add here commands to clean up after the build process. - [ ! -f Makefile ] || $(MAKE) clean - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - install -D -s -m 755 gkrellweather.so $(CURDIR)/debian/gkrellweather/usr/lib/gkrellm2/plugins/gkrellweather.so +override_dh_auto_install: + install -D -m 755 gkrellweather.so $(CURDIR)/debian/gkrellweather/usr/lib/gkrellm2/plugins/gkrellweather.so install -D -m 755 GrabWeather $(CURDIR)/debian/gkrellweather/usr/share/gkrellm/GrabWeather - -# Build architecture-independent files here. -binary-indep: -#Nothing to do here - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot -# dh_installdebconf - dh_installdocs -# dh_installexamples -# dh_installmenu -# dh_installemacsen -# dh_installpam -# dh_installinit -# dh_installcron -# dh_installmanpages -# dh_installinfo -# dh_undocumented - dh_installchangelogs ChangeLog -# dh_link /usr/lib/gkrellm/plugins/gkrellweather.so /usr/share/gkrellm/plugins/gkrellweather.so - dh_strip - dh_compress - dh_fixperms - # You may want to make some executables suid here. -# dh_suidregister -# dh_makeshlibs - dh_installdeb -# dh_perl - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-arch -.PHONY: build clean binary-arch binary install diff -Nru gkrellweather-2.0.8/debian/source/format gkrellweather-2.0.8/debian/source/format --- gkrellweather-2.0.8/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ gkrellweather-2.0.8/debian/source/format 2016-11-30 17:19:51.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru gkrellweather-2.0.8/debian/substvars gkrellweather-2.0.8/debian/substvars --- gkrellweather-2.0.8/debian/substvars 2016-12-01 07:34:17.000000000 +0000 +++ gkrellweather-2.0.8/debian/substvars 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -shlibs:Depends=libatk1.0-0 (>= 1.2.4), libc6 (>= 2.3.2-1), libglib2.0-0 (>= 2.2.3), libgtk2.0-0 (>= 2.2.1), libpango1.0-0 (>= 1.2.1) diff -Nru gkrellweather-2.0.8/gkrellweather.c gkrellweather-2.0.8/gkrellweather.c --- gkrellweather-2.0.8/gkrellweather.c 2016-12-01 07:34:17.000000000 +0000 +++ gkrellweather-2.0.8/gkrellweather.c 2009-01-11 18:15:02.000000000 +0000 @@ -721,7 +721,7 @@ options.station[1] = c[1]; options.station[2] = c[2]; options.station[3] = c[3]; - snprintf(options.command, 512, PREFIX "/share/gkrellm/GrabWeather %s", options.station); + snprintf(options.command, 512, PREFIX "/bin/GrabWeather %s", options.station); options.command[511] = 0; snprintf(options.filename, 512, "%s/.wmWeatherReports/%s.dat", getenv("HOME"), options.station); @@ -986,7 +986,7 @@ options.windspeed_unit = 1; options.pressure_unit = 1; strcpy(options.station, DEFAULT_STATION_ID); - snprintf(options.command, 512, PREFIX "/share/gkrellm/GrabWeather %s", options.station); + snprintf(options.command, 512, "/usr/share/gkrellm/GrabWeather %s", options.station); options.command[511] = 0; snprintf(options.filename, 512, "%s/.wmWeatherReports/%s.dat", getenv("HOME"), options.station); diff -Nru gkrellweather-2.0.8/GrabWeather gkrellweather-2.0.8/GrabWeather --- gkrellweather-2.0.8/GrabWeather 2016-12-01 07:34:17.000000000 +0000 +++ gkrellweather-2.0.8/GrabWeather 2009-01-11 18:15:02.000000000 +0000 @@ -40,13 +40,12 @@ # Is LWP installed? eval { require LWP::UserAgent }; if ($@) { - my $cmd = qq{wget --cache=off --passive-ftp --tries=0 --quiet } . + my $cmd = qq{wget --proxy=off --passive-ftp --tries=0 --quiet } . qq{--output-document=$home/$ReportDir/$HTMLFileName $URL}; `$cmd` == 0 or die "unable to fetch weather: $?"; } else { $ENV{FTP_PASSIVE} = 1; # LWP uses Net::FTP internally. my $ua = new LWP::UserAgent; - $ua->env_proxy(); my $req = new HTTP::Request( GET => $URL ); my $rsp = $ua->request( $req ); die $rsp->status_line unless $rsp->is_success; diff -Nru gkrellweather-2.0.8/Makefile gkrellweather-2.0.8/Makefile --- gkrellweather-2.0.8/Makefile 2016-12-01 07:34:17.000000000 +0000 +++ gkrellweather-2.0.8/Makefile 2009-01-11 18:15:02.000000000 +0000 @@ -32,11 +32,11 @@ install: (cd po && ${MAKE} install ) if [ -d /usr/lib/gkrellm2/plugins/ ] ; then \ - install -c -m 644 gkrellweather.so /usr/lib/gkrellm2/plugins/ ; \ + install -c -s -m 644 gkrellweather.so /usr/lib/gkrellm2/plugins/ ; \ elif [ -d $(PREFIX)/lib/gkrellm2/plugins/ ] ; then \ - install -c -m 644 gkrellweather.so $(PREFIX)/lib/gkrellm2/plugins/ ; \ + install -c -s -m 644 gkrellweather.so $(PREFIX)/lib/gkrellm2/plugins/ ; \ else \ - install -D -c -m 644 gkrellweather.so $(PREFIX)/lib/gkrellm2/plugins/gkrellweather.so ; \ + install -D -c -s -m 644 gkrellweather.so $(PREFIX)/lib/gkrellm2/plugins/gkrellweather.so ; \ fi install -c -m 755 GrabWeather $(PREFIX)/bin