Package: hardinfo Version: 0.5.1-1.2 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu raring ubuntu-patch
Dear Maintainer, We found several fixes in Ubuntu for hardinfo, that may interest Debian. It can replace patch from bug 554783 which include some of the fixes. *** /tmp/tmpqEJwJ1/bug_body The attached patch was applied to achieve the following: * debian/rules: - Don't install anything in /usr/local, otherwise FTBFS. - Add quilt support. * debian/control: - Add homepage field - Build-Depends on quilt. - Add ${misc:Depends} to hardinfo runtime Depends field. - Recommends lm-sensors to read information from sensors. (LP: #178600) * debian/patches: - 00-makefile-lib: Convert previous source modification to quilt patch. - 01-truncated_description.patch: Add to fix LP: #357189. - 02-fix-distro-crash.patch: From upstream, fix a crash when trying to get distro informations. (LP: #450447). - 03-detect-lxde.patch: Detect LXDE and Lubuntu from XDG_CURRENT_DESKTOP and DESKTOP_SESSION environment variables. (LP: #778148) Thanks for considering the patch. -- System Information: Debian Release: wheezy/sid APT prefers raring-updates APT policy: (500, 'raring-updates'), (500, 'raring-security'), (500, 'raring-proposed'), (500, 'raring') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.7.0-7-generic (SMP w/8 CPU cores) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
reverted: --- hardinfo-0.5.1/config.h +++ hardinfo-0.5.1.orig/config.h @@ -1,17 +0,0 @@ -#ifndef __CONFIG_H__ -#define __CONFIG_H__ - -#define VERSION "0.5.1" -#define ARCH_i386 -#define ARCH "ARCH_i386" -#define PLATFORM "Linux" -#define KERNEL "2.6.30-1-686" -#define HOSTNAME "comanche" -#define PREFIX "/usr/share/hardinfo/" -#define LIBPREFIX "/usr/lib/hardinfo/" -#define HAS_LINUX_WE -#define DEBUG(...) -#define ENABLE_BINRELOC 1 -#define RELEASE 1 - -#endif /* __CONFIG_H__ */ reverted: --- hardinfo-0.5.1/binreloc.c +++ hardinfo-0.5.1.orig/binreloc.c @@ -594,7 +594,7 @@ } #ifdef ARCH_x86_64 + dir = g_build_filename(prefix, "lib64", NULL); - dir = g_build_filename(prefix, "lib", NULL); #else dir = g_build_filename(prefix, "lib", NULL); #endif reverted: --- hardinfo-0.5.1/Makefile +++ hardinfo-0.5.1.orig/Makefile @@ -1,97 +0,0 @@ -GTK_LIBS = -lpthread -lgthread-2.0 -lrt -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -GTK_CFLAGS = -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -SOUP_LIBS = -SOUP_CFLAGS = -PACKAGE = hardinfo-0.5.1 -ARCHOPTS = -LIBDIR = /usr/lib - -CCFLAGS = -fPIC -pipe -Wall -g -CFLAGS = $(GTK_CFLAGS) $(SOUP_CFLAGS) -I. -CC = gcc $(ARCHOPTS) -g -CCSLOW = gcc -O0 -g - -# ---------------------------------------------------------------------------- - -OBJECTS = hardinfo.o shell.o util.o iconcache.o loadgraph.o \ - menu.o stock.o callbacks.o expr.o report.o binreloc.o \ - vendor.o socket.o syncmanager.o -BENCHMARK_OBJECTS = fbench.o sha1.o blowfish.o md5.o nqueens.o fftbench.o - -MODULES = computer.so devices.so benchmark.so network.so - -all: $(OBJECTS) $(MODULES) - $(CC) $(CCFLAGS) -o hardinfo -Wl,-export-dynamic $(OBJECTS) $(GTK_LIBS) \ - $(SOUP_LIBS) - -md5.o: - $(CCSLOW) $(CCFLAGS) $(CFLAGS) -c md5.c -o $@ - -blowfish.o: - $(CCSLOW) $(CCFLAGS) $(CFLAGS) -c blowfish.c -o $@ - -sha1.o: - $(CCSLOW) $(CCFLAGS) $(CFLAGS) -c sha1.c -o $@ - -fbench.o: - $(CCSLOW) $(CCFLAGS) $(CFLAGS) -c fbench.c -o $@ - -fftbench.o: - $(CCSLOW) $(CCFLAGS) $(CFLAGS) -c fftbench.c -o $@ - -nqueens.o: - $(CCSLOW) $(CCFLAGS) $(CFLAGS) -c nqueens.c -o $@ - -benchmark.so: benchmark.c - make $(BENCHMARK_OBJECTS) - $(CCSLOW) $(CCFLAGS) $(CFLAGS) -o $@ -shared $< $(BENCHMARK_OBJECTS) \ - $(GTK_FLAGS) $(GTK_LIBS) - ln -sf ../$@ modules - -%.so: %.c - $(CC) $(CCFLAGS) $(CFLAGS) -o $@ -shared $< $(GTK_FLAGS) $(GTK_LIBS) - ln -sf ../$@ modules - -clean: - rm -rf .xvpics pixmaps/.xvpics *.o *.so hardinfo modules/*.so report - find . -name \*~ -exec rm -v {} \; - find . -name x86 -type l -exec rm -v {} \; - -dist-clean: clean - rm -rf Makefile debian/hardinfo/ config.h arch/this - -package: dist-clean - @echo "Creating tar.gz..." - cd .. && tar czf $(PACKAGE).tar.gz $(PACKAGE)/* && cd $(PACKAGE) - @echo "Creating tar.bz2..." - cd .. && tar cjf $(PACKAGE).tar.bz2 $(PACKAGE)/* && cd $(PACKAGE) - -deb: dist-clean - @echo "Creating deb..." - dpkg-buildpackage -rfakeroot -k${USER} - -install: all - rm -rf ${DESTDIR}${LIBDIR}/hardinfo/modules ${DESTDIR}/usr/share/hardinfo/pixmaps - - mkdir -p ${DESTDIR}/usr/bin - mkdir -p ${DESTDIR}/usr/local - mkdir -p ${DESTDIR}/usr/share/applications - mkdir -p ${DESTDIR}${LIBDIR}/hardinfo/modules - mkdir -p ${DESTDIR}/usr/share/hardinfo/pixmaps - - cp hardinfo.desktop ${DESTDIR}/usr/share/applications - - cp hardinfo ${DESTDIR}/usr/bin/hardinfo - - cp -Lr modules/*.so ${DESTDIR}${LIBDIR}/hardinfo/modules - - cp -Lr pixmaps/* ${DESTDIR}/usr/share/hardinfo/pixmaps - - cp benchmark.conf ${DESTDIR}/usr/share/hardinfo - cp benchmark.data ${DESTDIR}/usr/share/hardinfo - - chmod 755 ${DESTDIR}/usr/bin/hardinfo - -installer: - makepackage - reverted: --- hardinfo-0.5.1/configure +++ hardinfo-0.5.1.orig/configure @@ -56,7 +56,7 @@ x86_64) ln -sf linux/x86_64 arch/this ARCH="ARCH_x86_64" + LIBDIR="/usr/lib64" ;; - LIBDIR="/usr/lib" ;; mips*) ln -sf linux/mips arch/this ARCH="ARCH_MIPS" ;; diff -u hardinfo-0.5.1/debian/control hardinfo-0.5.1/debian/control --- hardinfo-0.5.1/debian/control +++ hardinfo-0.5.1/debian/control @@ -2,12 +2,14 @@ Section: x11 Priority: optional Maintainer: Agney Lopes Roth Ferraz <ag...@debian.org> -Build-Depends: debhelper (>> 5.0.0), libgtk2.0-dev, pciutils (>=1:2.1.11-10), libsoup2.4-dev, libffi-dev +Build-Depends: debhelper (>> 5.0.0), libgtk2.0-dev, pciutils (>=1:2.1.11-10), libsoup2.4-dev, libffi-dev, quilt Standards-Version: 3.8.3.0 +Homepage: http://hardinfo.berlios.de/ Package: hardinfo Architecture: any -Depends: ${shlibs:Depends}, pciutils (>=1:2.1.11-10) +Depends: ${shlibs:Depends}, pciutils (>=1:2.1.11-10), ${misc:Depends} +Recommends: lm-sensors Suggests: mesa-utils Description: Displays system information HardInfo is a small application that displays information about your diff -u hardinfo-0.5.1/debian/changelog hardinfo-0.5.1/debian/changelog diff -u hardinfo-0.5.1/debian/rules hardinfo-0.5.1/debian/rules --- hardinfo-0.5.1/debian/rules +++ hardinfo-0.5.1/debian/rules @@ -7,6 +7,7 @@ +include /usr/share/quilt/quilt.make CFLAGS = -Wall -g @@ -20,7 +21,7 @@ endif configure: configure-stamp -configure-stamp: +configure-stamp: patch dh_testdir ./configure @@ -36,7 +37,7 @@ touch build-stamp -clean: +clean: unpatch dh_testdir dh_testroot rm -f build-stamp configure-stamp @@ -60,6 +61,8 @@ install -d `pwd`/debian/hardinfo/usr/share/applications install -m 644 debian/hardinfo.desktop \ `pwd`/debian/hardinfo/usr/share/applications + # Delete /usr/local to prevent FTBFS + rm -rf debian/hardinfo/usr/local # Build architecture-independent files here. binary-indep: build install only in patch2: unchanged: --- hardinfo-0.5.1.orig/debian/patches/02-fix-distro-crash.patch +++ hardinfo-0.5.1/debian/patches/02-fix-distro-crash.patch @@ -0,0 +1,22 @@ +#upstream bug : http://bugs.hardinfo.org/showreport.php?bugid=28 +#launchpad bug : https://bugs.edge.launchpad.net/ubuntu/+source/hardinfo/+bug/450447 +# git commit : http://github.com/lpereira/hardinfo/commit/1cd93bcccb8cedc4f5cd355b69f88512c1e2880a +Index: hardinfo-0.5.1/arch/linux/common/os.h +=================================================================== +--- hardinfo-0.5.1.orig/arch/linux/common/os.h 2010-03-08 21:39:07.000000000 +0100 ++++ hardinfo-0.5.1/arch/linux/common/os.h 2010-03-08 21:40:38.000000000 +0100 +@@ -200,8 +200,12 @@ + char buf[128]; + + distro_ver = fopen(distro_db[i].file, "r"); +- (void)fgets(buf, 128, distro_ver); +- fclose(distro_ver); ++ if (distro_ver) { ++ (void)fgets(buf, 128, distro_ver); ++ fclose(distro_ver); ++ } else { ++ continue; ++ } + + buf[strlen(buf) - 1] = 0; + only in patch2: unchanged: --- hardinfo-0.5.1.orig/debian/patches/series +++ hardinfo-0.5.1/debian/patches/series @@ -0,0 +1,4 @@ +00-makefile-lib.patch +01-truncated_description.patch +02-fix-distro-crash.patch +03-detect-lxde.patch only in patch2: unchanged: --- hardinfo-0.5.1.orig/debian/patches/03-detect-lxde.patch +++ hardinfo-0.5.1/debian/patches/03-detect-lxde.patch @@ -0,0 +1,24 @@ +#launchpad bug : https://bugs.launchpad.net/ubuntu/+source/hardinfo/+bug/778148 +Index: hardinfo-0.5.1/arch/linux/common/os.h +=================================================================== +--- hardinfo-0.5.1.orig/arch/linux/common/os.h 2011-05-10 23:41:11.167185645 -0700 ++++ hardinfo-0.5.1/arch/linux/common/os.h 2011-05-10 23:45:53.123715712 -0700 +@@ -151,8 +151,18 @@ + is defined */ + os->desktop = g_strdup("XFCE 4"); + } else { ++ if (g_getenv("XDG_CURRENT_DESKTOP")) { ++ os->desktop = g_strdup(g_getenv("XDG_CURRENT_DESKTOP")); ++ if (g_getenv("DESKTOP_SESSION") && ++ !g_str_equal(os->desktop, g_getenv("DESKTOP_SESSION"))) { ++ os->desktop = g_strdup_printf("%s (%s)", ++ g_getenv("XDG_CURRENT_DESKTOP"), ++ g_getenv("DESKTOP_SESSION")); ++ } ++ } else { + os->desktop = g_strdup_printf("Unknown (Window Manager: %s)", + windowman); ++ } + } + } else { + os->desktop = g_strdup("Unknown"); only in patch2: unchanged: --- hardinfo-0.5.1.orig/debian/patches/00-makefile-lib.patch +++ hardinfo-0.5.1/debian/patches/00-makefile-lib.patch @@ -0,0 +1,142 @@ +--- hardinfo-0.5.1.orig/binreloc.c ++++ hardinfo-0.5.1/binreloc.c +@@ -594,7 +594,7 @@ gchar *gbr_find_lib_dir(const gchar * de + } + + #ifdef ARCH_x86_64 +- dir = g_build_filename(prefix, "lib64", NULL); ++ dir = g_build_filename(prefix, "lib", NULL); + #else + dir = g_build_filename(prefix, "lib", NULL); + #endif +--- /dev/null ++++ hardinfo-0.5.1/config.h +@@ -0,0 +1,17 @@ ++#ifndef __CONFIG_H__ ++#define __CONFIG_H__ ++ ++#define VERSION "0.5.1" ++#define ARCH_i386 ++#define ARCH "ARCH_i386" ++#define PLATFORM "Linux" ++#define KERNEL "2.6.30-1-686" ++#define HOSTNAME "comanche" ++#define PREFIX "/usr/share/hardinfo/" ++#define LIBPREFIX "/usr/lib/hardinfo/" ++#define HAS_LINUX_WE ++#define DEBUG(...) ++#define ENABLE_BINRELOC 1 ++#define RELEASE 1 ++ ++#endif /* __CONFIG_H__ */ +--- /dev/null ++++ hardinfo-0.5.1/Makefile +@@ -0,0 +1,97 @@ ++GTK_LIBS = -lpthread -lgthread-2.0 -lrt -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 ++GTK_CFLAGS = -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include ++SOUP_LIBS = ++SOUP_CFLAGS = ++PACKAGE = hardinfo-0.5.1 ++ARCHOPTS = ++LIBDIR = /usr/lib ++ ++CCFLAGS = -fPIC -pipe -Wall -g ++CFLAGS = $(GTK_CFLAGS) $(SOUP_CFLAGS) -I. ++CC = gcc $(ARCHOPTS) -g ++CCSLOW = gcc -O0 -g ++ ++# ---------------------------------------------------------------------------- ++ ++OBJECTS = hardinfo.o shell.o util.o iconcache.o loadgraph.o \ ++ menu.o stock.o callbacks.o expr.o report.o binreloc.o \ ++ vendor.o socket.o syncmanager.o ++BENCHMARK_OBJECTS = fbench.o sha1.o blowfish.o md5.o nqueens.o fftbench.o ++ ++MODULES = computer.so devices.so benchmark.so network.so ++ ++all: $(OBJECTS) $(MODULES) ++ $(CC) $(CCFLAGS) -o hardinfo -Wl,-export-dynamic $(OBJECTS) $(GTK_LIBS) \ ++ $(SOUP_LIBS) ++ ++md5.o: ++ $(CCSLOW) $(CCFLAGS) $(CFLAGS) -c md5.c -o $@ ++ ++blowfish.o: ++ $(CCSLOW) $(CCFLAGS) $(CFLAGS) -c blowfish.c -o $@ ++ ++sha1.o: ++ $(CCSLOW) $(CCFLAGS) $(CFLAGS) -c sha1.c -o $@ ++ ++fbench.o: ++ $(CCSLOW) $(CCFLAGS) $(CFLAGS) -c fbench.c -o $@ ++ ++fftbench.o: ++ $(CCSLOW) $(CCFLAGS) $(CFLAGS) -c fftbench.c -o $@ ++ ++nqueens.o: ++ $(CCSLOW) $(CCFLAGS) $(CFLAGS) -c nqueens.c -o $@ ++ ++benchmark.so: benchmark.c ++ make $(BENCHMARK_OBJECTS) ++ $(CCSLOW) $(CCFLAGS) $(CFLAGS) -o $@ -shared $< $(BENCHMARK_OBJECTS) \ ++ $(GTK_FLAGS) $(GTK_LIBS) ++ ln -sf ../$@ modules ++ ++%.so: %.c ++ $(CC) $(CCFLAGS) $(CFLAGS) -o $@ -shared $< $(GTK_FLAGS) $(GTK_LIBS) ++ ln -sf ../$@ modules ++ ++clean: ++ rm -rf .xvpics pixmaps/.xvpics *.o *.so hardinfo modules/*.so report ++ find . -name \*~ -exec rm -v {} \; ++ find . -name x86 -type l -exec rm -v {} \; ++ ++dist-clean: clean ++ rm -rf Makefile debian/hardinfo/ config.h arch/this ++ ++package: dist-clean ++ @echo "Creating tar.gz..." ++ cd .. && tar czf $(PACKAGE).tar.gz $(PACKAGE)/* && cd $(PACKAGE) ++ @echo "Creating tar.bz2..." ++ cd .. && tar cjf $(PACKAGE).tar.bz2 $(PACKAGE)/* && cd $(PACKAGE) ++ ++deb: dist-clean ++ @echo "Creating deb..." ++ dpkg-buildpackage -rfakeroot -k${USER} ++ ++install: all ++ rm -rf ${DESTDIR}${LIBDIR}/hardinfo/modules ${DESTDIR}/usr/share/hardinfo/pixmaps ++ ++ mkdir -p ${DESTDIR}/usr/bin ++ mkdir -p ${DESTDIR}/usr/local ++ mkdir -p ${DESTDIR}/usr/share/applications ++ mkdir -p ${DESTDIR}${LIBDIR}/hardinfo/modules ++ mkdir -p ${DESTDIR}/usr/share/hardinfo/pixmaps ++ ++ cp hardinfo.desktop ${DESTDIR}/usr/share/applications ++ ++ cp hardinfo ${DESTDIR}/usr/bin/hardinfo ++ ++ cp -Lr modules/*.so ${DESTDIR}${LIBDIR}/hardinfo/modules ++ ++ cp -Lr pixmaps/* ${DESTDIR}/usr/share/hardinfo/pixmaps ++ ++ cp benchmark.conf ${DESTDIR}/usr/share/hardinfo ++ cp benchmark.data ${DESTDIR}/usr/share/hardinfo ++ ++ chmod 755 ${DESTDIR}/usr/bin/hardinfo ++ ++installer: ++ makepackage ++ +--- hardinfo-0.5.1.orig/configure ++++ hardinfo-0.5.1/configure +@@ -56,7 +56,7 @@ case $PROC in + x86_64) + ln -sf linux/x86_64 arch/this + ARCH="ARCH_x86_64" +- LIBDIR="/usr/lib64" ;; ++ LIBDIR="/usr/lib" ;; + mips*) + ln -sf linux/mips arch/this + ARCH="ARCH_MIPS" ;; only in patch2: unchanged: --- hardinfo-0.5.1.orig/debian/patches/01-truncated_description.patch +++ hardinfo-0.5.1/debian/patches/01-truncated_description.patch @@ -0,0 +1,21 @@ +Vendor: http://github.com/lpereira/hardinfo/commit/07ba0e3bf71c3c5ad7d98be58160e13069d9cf77 +Description: + Fix PCI device description parsing (don't stop reading when a '(' is found). +Bug-Ubuntu: https://bugs.launchpad.net/bugs/357189 +--- + arch/linux/common/pci.h | 4 ---- + 1 file changed, 4 deletions(-) + +--- hardinfo-0.5.1.orig/arch/linux/common/pci.h ++++ hardinfo-0.5.1/arch/linux/common/pci.h +@@ -186,10 +186,6 @@ __scan_pci(void) + category = g_strdup(buf); + + buf = end; +- start = buf; +- WALK_UNTIL('('); +- *buf = 0; +- buf = start + 1; + + if (strstr(category, "RAM memory")) icon = "mem"; + else if (strstr(category, "Multimedia")) icon = "media";