Mailinglist Archive: opensuse-project (95 mails)
| < Previous | Next > |
Re: [opensuse-project] Procinfo and Procinfo-NG
- From: Cristian Rodriguez <crrodriguez@xxxxxxx>
- Date: Wed, 22 Aug 2007 18:58:04 -0400
- Message-id: <46CCBF7C.6040606@xxxxxxx>
tabris escribió:
> I'd like to see this picked up by SuSE, MDV, etc. If you have any
> comments, please don't hesitate to email me back.
>
In about 15 minutes, I packaged your software so it can tested by
opensuse users, as procinfo-ng with executable name procinfo-ng
here
http://download.opensuse.org/repositories/home:/elvigia/
it will appear as soon at the automated build system finishes it's job.
some points:
1. if you want to get your software into a distribution, it should
support make install with DESTDIR otherwise it will inmediately annoy
packagers (the attached patch fixes this problem)
2. do not assume optimization flags , distributions have their own rules
for that and respect userland CFLAGS ( patch attached fixes that as well)
3. tons of compiler warnings. ( patch wont fix that, I let you this work
;) )
g++ -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-pipe -s procinfo.cpp -o procinfo
In file included from procinfo.cpp:19:
routines.cpp: In function 'const std::string uint64toString(const
uint64_t&)':
routines.cpp:87: warning: format '%llu' expects type 'long long unsigned
int', but argument 4 has type 'long unsigned int'
routines.cpp:87: warning: format '%llu' expects type 'long long unsigned
int', but argument 4 has type 'long unsigned int'
routines.cpp: In function 'const std::string int64toString(const int64_t&)':
routines.cpp:93: warning: format '%lld' expects type 'long long int',
but argument 4 has type 'long int'
routines.cpp:93: warning: format '%lld' expects type 'long long int',
but argument 4 has type 'long int'
procinfo.cpp: In function 'std::vector<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::allocator<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > renderPageStat(bool, bool, double, const
uint64_t&, const std::string&)':
procinfo.cpp:344: warning: format '%15llu' expects type 'long long
unsigned int', but argument 4 has type 'uint64_t'
procinfo.cpp:344: warning: format '%15llu' expects type 'long long
unsigned int', but argument 4 has type 'uint64_t'
procinfo.cpp: In function 'std::string renderIRQ(bool, bool, const
double&, const IRQ&, const uint64_t&)':
procinfo.cpp:469: warning: format '%llu' expects type 'long long
unsigned int', but argument 4 has type 'uint64_t'
procinfo.cpp:469: warning: format '%llu' expects type 'long long
unsigned int', but argument 4 has type 'uint64_t'
procinfo.cpp: In function
'std::vector<std::vector<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::allocator<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > > >,
std::allocator<std::vector<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::allocator<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > > > renderDiskStats(bool, bool, bool, const
double&, const std::vector<diskStat_t, std::allocator<diskStat_t> >&)':
procinfo.cpp:589: warning: format '%15llu' expects type 'long long
unsigned int', but argument 5 has type 'long unsigned int'
procinfo.cpp:589: warning: format '%15llu' expects type 'long long
unsigned int', but argument 6 has type 'long unsigned int'
procinfo.cpp:589: warning: format '%15llu' expects type 'long long
unsigned int', but argument 5 has type 'long unsigned int'
procinfo.cpp:589: warning: format '%15llu' expects type 'long long
unsigned int', but argument 6 has type 'long unsigned int'
that's all , have fun ;)
--
WARNING: This bug is visible only to employees, You are allowed to be
mad at them.
Index: Makefile.in
===================================================================
--- Makefile.in.orig 2007-05-19 22:28:00.000000000 +0200
+++ Makefile.in 2007-08-23 00:47:51.000000000 +0200
@@ -2,6 +2,8 @@
prefix=/usr
+mandir= @mandir@
+
CXX = @CXX@
CFLAGS = @CFLAGS@
@@ -41,7 +43,7 @@ procinfo: procinfo.cpp routines.cpp Make
# $(XX) $(CFLAGS) procinfo.cpp -o procinfo.o
install: procinfo procinfo.8
- -mkdir -p $(prefix)/bin
- install procinfo $(prefix)/bin/procinfo
- -mkdir -p $(prefix)/man/man8
- install -m 644 procinfo.8 $(prefix)/man/man8/procinfo.8
+ -mkdir -p $(DESTDIR)$(prefix)/bin
+ install procinfo $(DESTDIR)$(prefix)/bin/procinfo-ng
+ -mkdir -p $(DESTDIR)$(mandir)/man8
+ install -m 644 procinfo.8 $(DESTDIR)$(mandir)/man8/procinfo-ng.8
Index: configure.in
===================================================================
--- configure.in.orig 2007-06-04 20:12:00.000000000 +0200
+++ configure.in 2007-08-23 00:36:31.000000000 +0200
@@ -35,7 +35,7 @@ if test "$enable_maintainer_mode" = "yes
CFLAGS="-O0 -g3 --pipe -Wall"
LDFLAGS=""
else
- CFLAGS="-O3 --pipe"
+ CFLAGS="$CFLAGS -pipe"
LDFLAGS="-s"
fi
> I'd like to see this picked up by SuSE, MDV, etc. If you have any
> comments, please don't hesitate to email me back.
>
In about 15 minutes, I packaged your software so it can tested by
opensuse users, as procinfo-ng with executable name procinfo-ng
here
http://download.opensuse.org/repositories/home:/elvigia/
it will appear as soon at the automated build system finishes it's job.
some points:
1. if you want to get your software into a distribution, it should
support make install with DESTDIR otherwise it will inmediately annoy
packagers (the attached patch fixes this problem)
2. do not assume optimization flags , distributions have their own rules
for that and respect userland CFLAGS ( patch attached fixes that as well)
3. tons of compiler warnings. ( patch wont fix that, I let you this work
;) )
g++ -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-pipe -s procinfo.cpp -o procinfo
In file included from procinfo.cpp:19:
routines.cpp: In function 'const std::string uint64toString(const
uint64_t&)':
routines.cpp:87: warning: format '%llu' expects type 'long long unsigned
int', but argument 4 has type 'long unsigned int'
routines.cpp:87: warning: format '%llu' expects type 'long long unsigned
int', but argument 4 has type 'long unsigned int'
routines.cpp: In function 'const std::string int64toString(const int64_t&)':
routines.cpp:93: warning: format '%lld' expects type 'long long int',
but argument 4 has type 'long int'
routines.cpp:93: warning: format '%lld' expects type 'long long int',
but argument 4 has type 'long int'
procinfo.cpp: In function 'std::vector<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::allocator<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > renderPageStat(bool, bool, double, const
uint64_t&, const std::string&)':
procinfo.cpp:344: warning: format '%15llu' expects type 'long long
unsigned int', but argument 4 has type 'uint64_t'
procinfo.cpp:344: warning: format '%15llu' expects type 'long long
unsigned int', but argument 4 has type 'uint64_t'
procinfo.cpp: In function 'std::string renderIRQ(bool, bool, const
double&, const IRQ&, const uint64_t&)':
procinfo.cpp:469: warning: format '%llu' expects type 'long long
unsigned int', but argument 4 has type 'uint64_t'
procinfo.cpp:469: warning: format '%llu' expects type 'long long
unsigned int', but argument 4 has type 'uint64_t'
procinfo.cpp: In function
'std::vector<std::vector<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::allocator<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > > >,
std::allocator<std::vector<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::allocator<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > > > renderDiskStats(bool, bool, bool, const
double&, const std::vector<diskStat_t, std::allocator<diskStat_t> >&)':
procinfo.cpp:589: warning: format '%15llu' expects type 'long long
unsigned int', but argument 5 has type 'long unsigned int'
procinfo.cpp:589: warning: format '%15llu' expects type 'long long
unsigned int', but argument 6 has type 'long unsigned int'
procinfo.cpp:589: warning: format '%15llu' expects type 'long long
unsigned int', but argument 5 has type 'long unsigned int'
procinfo.cpp:589: warning: format '%15llu' expects type 'long long
unsigned int', but argument 6 has type 'long unsigned int'
that's all , have fun ;)
--
WARNING: This bug is visible only to employees, You are allowed to be
mad at them.
Index: Makefile.in
===================================================================
--- Makefile.in.orig 2007-05-19 22:28:00.000000000 +0200
+++ Makefile.in 2007-08-23 00:47:51.000000000 +0200
@@ -2,6 +2,8 @@
prefix=/usr
+mandir= @mandir@
+
CXX = @CXX@
CFLAGS = @CFLAGS@
@@ -41,7 +43,7 @@ procinfo: procinfo.cpp routines.cpp Make
# $(XX) $(CFLAGS) procinfo.cpp -o procinfo.o
install: procinfo procinfo.8
- -mkdir -p $(prefix)/bin
- install procinfo $(prefix)/bin/procinfo
- -mkdir -p $(prefix)/man/man8
- install -m 644 procinfo.8 $(prefix)/man/man8/procinfo.8
+ -mkdir -p $(DESTDIR)$(prefix)/bin
+ install procinfo $(DESTDIR)$(prefix)/bin/procinfo-ng
+ -mkdir -p $(DESTDIR)$(mandir)/man8
+ install -m 644 procinfo.8 $(DESTDIR)$(mandir)/man8/procinfo-ng.8
Index: configure.in
===================================================================
--- configure.in.orig 2007-06-04 20:12:00.000000000 +0200
+++ configure.in 2007-08-23 00:36:31.000000000 +0200
@@ -35,7 +35,7 @@ if test "$enable_maintainer_mode" = "yes
CFLAGS="-O0 -g3 --pipe -Wall"
LDFLAGS=""
else
- CFLAGS="-O3 --pipe"
+ CFLAGS="$CFLAGS -pipe"
LDFLAGS="-s"
fi
| < Previous | Next > |